From 0def3757461e3065b3551feadaff3b0b5cdd69df Mon Sep 17 00:00:00 2001 From: Mustafa Senoglu Date: Sat, 27 Jun 2026 18:15:51 +0300 Subject: [PATCH] fix(createReducer): return action from Dispatch to match Redux types The Dispatch type was returning void, which caused TypeScript errors when using createReducer with redux-thunk or other middleware that expect the dispatch to return the action. Fixes #856 --- src/factory/createReducer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/factory/createReducer.ts b/src/factory/createReducer.ts index ef2af42efc..8489d9548a 100644 --- a/src/factory/createReducer.ts +++ b/src/factory/createReducer.ts @@ -1,7 +1,7 @@ import { MutableRefObject, useCallback, useRef, useState } from 'react'; import useUpdateEffect from '../useUpdateEffect'; -type Dispatch = (action: Action) => void; +type Dispatch = (action: Action) => Action; interface Store { getState: () => State;