When keeping track of a checkbox with state, should I use !prevState when it’s clicked or current state to switch the value? What are the differences?

Go to top