DEV Community

Discussion on: Set a callback to setState(useState) in React funtional Component

Collapse
 
dance2die profile image
Sung M. Kim • Edited

Thank you for sharing this trick, Chandra.

This was definitely asked a lot on StackOverflow, as setState provides a callback, but setting states using useState hooks' updator functions don't provide the same functionality.