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.
https://overreacted.io/a-complete-guide-to-useeffect/#why-usereducer-is-the-cheat-mode-of-hooks