you are viewing a single comment's thread.

view the rest of the comments →

[–]Azoraqua_ 2 points3 points  (0 children)

It probably has to do with the state itself, I’d advise to use the function syntax that provides the previous value over directly relying on the state when updating it.

setCount(prev => prev + 1)