With regards to this question:
useReducer Action dispatched twice
I've adapted a small code snippet in codesandbox taken from Dan Abramov's blog right here.
Now my question is this:
If I type something in the input field in between the 5 seconds interval and then inspect the console output I observe that when dispatch fires the "supposedly" closed over value of step
is the newly updated value I just typed in the input field instead of 1
which was the case when useEffect was declared. Why is this the case?