Back to React Hooks
Select all
What does useReducer do?
An alternative to useState for complex state logic, accepts a reducer function and initial state
Due
Created Jan 7, 2026•Ease: 2.85•Interval: 13 days
What is the purpose of useCallback?
Returns a memoized callback function that only changes when dependencies change
Due
Created Jan 7, 2026•Ease: 2.47•Interval: 3 days
When should you use useMemo?
To memoize expensive calculations that only need to recompute when dependencies change
Due
Created Jan 7, 2026•Ease: 2.50•Interval: 6 days
What does useRef return?
A mutable ref object with a .current property that persists across renders
Due
Created Jan 7, 2026•Ease: 2.50•Interval: 0 days
What is useContext used for?
Subscribing to React context without wrapping components in Consumer
Due
Created Jan 7, 2026•Ease: 3.00•Interval: 11 days
How do you run useEffect only once on mount?
Pass an empty dependency array: useEffect(() => {}, [])
Due
Created Jan 7, 2026•Ease: 2.52•Interval: 3 days