Chrome Browser throws a lot of errors even with correct solution

  1. You are not using the current state for anything so you do not need access to it.

  2. 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.