-
You are not using the current state for anything so you do not need access to it.
-
React 16 does not allow you to use the event object inside the updater function as you are doing (it will be null).
Check out this post for some more info.
You are not using the current state for anything so you do not need access to it.
React 16 does not allow you to use the event object inside the updater function as you are doing (it will be null).
Check out this post for some more info.