useCallback
useCallback in React helps prevent unnecessary re-renders by memorising functions.
·1 min read
Web Developer
Stockholm, Sweden
Scalable solutions for startups, enterprises, and agencies
2025
Delivering scalable solutions for
startups, enterprises, and agencies.
useCallback in React helps prevent unnecessary re-renders by memorising functions.
Optimises performance by memoising values, recalculating only when dependencies change.
useRef in React acts like a bookmark for elements or a pocket for mutable values. It persists through re-renders without triggering updates.