1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-23 09:22:52 +02:00

Update Detailed Explanation for useCallback Hook in React Documentation usecallback@2zrN65JZhCyNimi33g78f.md (#6237)

* Update usecallback@2zrN65JZhCyNimi33g78f.md

this is an update for the useCallback explanation on roadmap.sh

* Update src/data/roadmaps/react/content/usecallback@2zrN65JZhCyNimi33g78f.md

---------

Co-authored-by: dsh <daniel.s.holdsworth@gmail.com>
This commit is contained in:
Glen Miracle
2024-07-26 10:07:59 +02:00
committed by GitHub
parent 331c45446c
commit 068a896caf

View File

@@ -1 +1,9 @@
# useCallback
`useCallback` is a React hook that returns a memoized version of a callback function. It's used to optimize performance by preventing unnecessary re-renders. Specifically, it helps avoid recreating functions when their dependencies haven't changed, which can be useful when passing callbacks to child components that rely on referential equality to prevent re-rendering.
Visit the following resources to learn more:
- [@article@React Documentation on useCallback](https://reactjs.org/docs/hooks-reference.html#usecallback)
- [@article@useCallback Explained in Depth](https://kentcdodds.com/blog/usememo-and-usecallback)
- [@article@useCallback Hook: An Introductory Guide](https://dmitripavlutin.com/dont-overuse-react-usecallback/)