DEV Community 👩‍💻👨‍💻

Discussion on: Build a react-router clone from scratch

adnanaslam profile image
Adnan Aslam

useCallback() hook is used to capture the whole function just a way to optimize the performance like as memoisation.

useCallback() used in conjunction with useEffect() because it allows you to prevent the re-creation of a function.

I hope this information helps you in understanding the useCallback() hook in react.


harshilparmar profile image
Harshil Parmar

Thanks brother!!