Tip: hide sidebars on smaller screens for more reading space
useRef, useMemo & useCallback
hardComplete guide with examples and interview questions · 40 min
Definition
Say it out loud in an interview — clear, simple, no textbook wording.
useRef holds mutable values without re-render; useMemo/useCallback cache values and functions between renders.
In React interviews, start with a one-sentence definition, then show a minimal component. Senior rounds go deeper on re-renders, hooks rules, and performance trade-offs.
Quick Stats
40
Minutes
hard
Difficulty
4
Interview Q's
Key takeaways
- •useRef holds mutable values without re-render; useMemo/useCallback cache values and functions between renders
- •Know one interview-ready example
- •State common pitfalls senior interviewers probe
- •Connect useRef, useMemo & useCallback to real component design trade-offs
Track your mastery
Sign in to save Q&A scores, coding challenge progress, points, and streaks across devices.
Sign in to save progress