Skip to content

Commit 270e12f

Browse files
committed
fix: updateState,reducer 函数计算 update 时传入 newState
1 parent 0ae611e commit 270e12f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-reconciler/src/updateQueue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export const processUpdateQueue = <State>(
138138
if (pending.hasEagerState) {
139139
newState = pending.eagerState;
140140
} else {
141-
newState = basicStateReducer(baseState, action);
141+
newState = basicStateReducer(newState, action);
142142
}
143143
}
144144
pending = pending.next as Update<any>;

0 commit comments

Comments
 (0)