React · Middle · Question 72 of 75
When does a useRef value change cause a re-render?
- ✓Correct answer: Never - changing
ref.currentdoesn't trigger rendering - 2Always on the next tick
- 3Only if the ref is attached to a DOM node
Explanation
Refs are for values that don't affect the output: timer ids, previous values, DOM nodes. If the UI should change, use state.