Skip to content

fix(Answer): use useId to generate unique answer label IDs#766

Merged
huyenltnguyen merged 1 commit intofreeCodeCamp:mainfrom
huyenltnguyen:fix/quiz-question
Mar 20, 2026
Merged

fix(Answer): use useId to generate unique answer label IDs#766
huyenltnguyen merged 1 commit intofreeCodeCamp:mainfrom
huyenltnguyen:fix/quiz-question

Conversation

@huyenltnguyen
Copy link
Copy Markdown
Member

Checklist:

This PR:

Replaces the value-based ID (quiz-answer-${value}-label) with React's
useId hook so that multiple QuizQuestion instances with the same answer
values no longer produce duplicate IDs in the DOM.
@huyenltnguyen huyenltnguyen marked this pull request as ready for review March 20, 2026 19:41
@huyenltnguyen huyenltnguyen requested a review from a team as a code owner March 20, 2026 19:41
@huyenltnguyen huyenltnguyen merged commit aa8e736 into freeCodeCamp:main Mar 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant