Answer the following conceptual questions about JavaScript and React:
useState vs useRef
useState
hook, and how does it behave with respect to component re-renders?
useRef
hook? How is its behavior different from
useState
?
useState
vs
useRef
? Give a few concrete examples.
Explain in enough detail that a junior engineer could understand the key differences and trade-offs.
Login required