In this video, introduced useCallBack hook and when we have to use So let us see How to use the useCallback React hook. So, we have use Effect right , now we have to write all the code inside it that is to be played after render . So, we can write outside of useEffect() but what happens that each time a new function is created whenever useEffect run and to stop this useCallBack comes into picture. What It will do, it will store the function if the dependencies changes after the render then the function inside callBack will run.

React hooks: https://github.com/Anshuman301/hooks-practice

Subscribe : https://www.youtube.com/channel/UCs6nmQViDpUw0nuIx9c_WvA

#react #react-hooks #javascript

How to use the useCallback React hook
2.65 GEEK