Skip to content

Commit 5923008

Browse files
committed
refactor: renaming in useAction
1 parent fdb3f17 commit 5923008

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function useRestate<TState, USelector>(
5555

5656
export function useAction<TAction extends Action>(action: TAction): () => TAction {
5757
const store = useStore();
58-
const memoizedDispatch = useCallback(() => store.dispatch(action), [action]);
58+
const dispatch = useCallback(() => store.dispatch(action), [action]);
5959

60-
return memoizedDispatch;
60+
return dispatch;
6161
}

0 commit comments

Comments
 (0)