Problem Statement
Which hook provides a way to hold a mutable value that doesn’t trigger re-renders?
Explanation
useRef stores a value that persists across renders without causing re-renders when it changes.
It’s often used to reference DOM or native elements, or to store mutable variables like timers.
Code Solution
SolutionRead Only
const timer = useRef(null);