Pregunta de entrevista de Tata Consultancy Services

What is the difference between useState and useRef? When would you use useRef instead of useState?