DEV Community

Discussion on: React Hooks: useState()

Collapse
 
michaeljota profile image
Michael De Abreu

In this case, as same as arrays, it would be better to use the function callback and use the state that the callback gets as a param.