Skip to content

Commit 6670512

Browse files
committed
Remember eagerReducer even if there is nothing in the queue
1 parent daac56e commit 6670512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-reconciler/src/ReactFiberHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,9 @@ function updateReducer<S, I, A>(
742742
hook.baseUpdate = newBaseUpdate;
743743
hook.baseState = newBaseState;
744744

745-
queue.eagerReducer = reducer;
746745
queue.eagerState = newState;
747746
}
747+
queue.eagerReducer = reducer;
748748

749749
const dispatch: Dispatch<A> = (queue.dispatch: any);
750750
return [hook.memoizedState, dispatch];

0 commit comments

Comments
 (0)