Solutionunvalidated
Instead of `useRef`, we can change it to `useState` — for a DOM node that may not exist or change during the component's render. Tension: so that we can track ref changes in the state and trigger re-renders as needed.
9a601e0a-4a70-4ad8-b0c0-070e24b0bc66
Instead of useRef, we can change it to useState — for a DOM node that may not exist or change during the component's render. Tension: so that we can track ref changes in the state and trigger re-renders as needed.