What is useCallback hook in React? | useCallback hook in-depth

Опубликовано: 12 Март 2026
на канале: Varun Prashar
339
21

When a component gets a function as a prop from its parent, then whenever a parent is rendered, its child component will get re-rendered every time no matter even if you have used React.memo().

But why this happens?

Topics covered:
1. What is useCallback hook?
2. What is the problem it solves?
3. How it works?
4. Example code to see useCallback in action
5. Why it behaves like this
6. Why you should not wrap every function inside useCallback hook
7. Final Summary

Other Videos:

React Optimisation:
1. What is React.memo and how it works:    • React Optimisation using React.memo | How ...  

React Hooks for Beginners
1. Understanding useEffect hook in detail:    • React: Understanding useEffect hook in det...  
2. Learn useReducer Hook in React:    • Learn useReducer Hook in React (complete g...  

React Projects for Beginners:
1. Create Todo App in React:    • Build a Todo App with React using Hooks | ...  
2. Create a CRUD App in React:    • Create a CRUD App in React  

React Beginners Series:
1. Complete React Roadmap:    • React Roadmap for developers 2021 | React ...  
2. What is React? useState hook:    • React Tutorial: What is React? | Thinking ...  
3. Props in React”    • What are props in React (in-detail)? | Con...  
4. Conditional rendering in React?:    • React Tutorial: What is conditional Render...  
5. List & Keys in React:    • Lists & Keys in React | Create your own cu...  
6. Handling Forms in React:    • React Tutorial: Handling Forms in React (C...  
7. Creating Signup form in React:    • How to create Signup / Registration form i...  

Connect with me:
LinkedIn:   / varunprashar5  
Twitter:   / varunprashar  

Would love to mentor you or answer your queries personally on programming