Good explanation about React 18 auto batching! Anyway, I think it would be better if you can update setState examples by using callbacks instead of referencing the current state value directly
setCountOne(countOne => countOne + 1);
Thank you,
Thanks very much! Great suggestion, I've updated the article. Appreciate it & all the best.
very nice 😍!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
Good explanation about React 18 auto batching!
Anyway, I think it would be better if you can update setState examples by using callbacks instead of referencing the current state value directly
Thank you,
Thanks very much! Great suggestion, I've updated the article. Appreciate it & all the best.
very nice 😍!