-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Closed
Description
React version: 16.8.0
Steps To Reproduce
Link to code example:
https://codesandbox.io/s/usereducer-wfcmq Link to codesandbox.
The current behavior
Initially step is 0. So for every step react does not rerender due to this https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberHooks.js#L1347. But state updates are queued. So when step changes all the state updates are done and hence creates a bug by adding the new step prop.