I am sorry, but I did not understand the answer about setCount(prevCount => prevCount + 1);
As for me I think, that approach setCount(count + 1) is simplier then your solution.
If I write the code setCount(count + 1) will it correct work, or I am making a mistake
Thank you!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am sorry, but I did not understand the answer about setCount(prevCount => prevCount + 1);
As for me I think, that approach setCount(count + 1) is simplier then your solution.
If I write the code setCount(count + 1) will it correct work, or I am making a mistake
Thank you!