![Provide callback to useState hook like setState](https://www.wisdomgeek.com/wp-content/uploads/2020/11/react-hooks-520x293.jpg)
Provide callback to useState hook like setState
If you have been writing class components for a while, you might be familiar with the callback functionality that the setState function provides. setState allows a second parameter to be passed to it as a callback. The callback function is invoked whenever the state of the function gets updated. But,...