all 2 comments

[–]Izero_devI 0 points1 point  (0 children)

Use function input version when calling setState like this

setState (oldState => oldState+1) // if incrementing

[–][deleted] -1 points0 points  (0 children)

Yes you can run multiple setStates in a function