Accessibility · Middle · Question 69 of 75
How does useId help in React forms?
- 1It generates keys for lists of inputs that change order
- 2It makes unique, SSR-safe ids for
htmlForand ARIA links - 3It stores a user's id so the form can be pre-filled later
Show the answer
Correct answer: It makes unique, SSR-safe ids for htmlFor and ARIA links
Explanation
Reusable components can't hard-code ids, or two instances would clash. Don't use it for list keys.