We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdb3f17 commit 5923008Copy full SHA for 5923008
1 file changed
src/index.ts
@@ -55,7 +55,7 @@ export function useRestate<TState, USelector>(
55
56
export function useAction<TAction extends Action>(action: TAction): () => TAction {
57
const store = useStore();
58
- const memoizedDispatch = useCallback(() => store.dispatch(action), [action]);
+ const dispatch = useCallback(() => store.dispatch(action), [action]);
59
60
- return memoizedDispatch;
+ return dispatch;
61
}
0 commit comments