What is the best practice to set a new state based on the current state?
E.g.:
setCount(count + 1)
is it correct? What the risks?
What is the best practice to set a new state based on the current state?
E.g.:
setCount(count + 1)
is it correct? What the risks?