From 068a896caf3a86ac264b98d84b3e306511d0f2e6 Mon Sep 17 00:00:00 2001 From: Glen Miracle Date: Fri, 26 Jul 2024 10:07:59 +0200 Subject: [PATCH] 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 --- .../react/content/usecallback@2zrN65JZhCyNimi33g78f.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/data/roadmaps/react/content/usecallback@2zrN65JZhCyNimi33g78f.md b/src/data/roadmaps/react/content/usecallback@2zrN65JZhCyNimi33g78f.md index 399b35916..f41f96140 100644 --- a/src/data/roadmaps/react/content/usecallback@2zrN65JZhCyNimi33g78f.md +++ b/src/data/roadmaps/react/content/usecallback@2zrN65JZhCyNimi33g78f.md @@ -1 +1,9 @@ -# useCallback \ No newline at end of file +# 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/)