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.
@Cheers adnanaslam
Thanks brother!!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
@Cheers
adnanaslam
Thanks brother!!