When do you use useRef instead of useState, and why doesn't changing a ref re-render?
The answer
Answer it out loud first, the way you would in the interview. Then compare.
Checking your sign-in…