[x] My pull request has a descriptive title (not a vague title like Update index.md)
This PR makes the following changes to the Quiz component:
Add correctAnswer prop to each question
This is a required prop, which is needed for the validation
Return a validateAnswers function from useQuiz
When called, this function will compare the selected answers against the correct answers, and pass the correct/incorrect status to each question accordingly
Return a correctAnswerCount value from useQuiz
Screen recording of the With Validation demo, which mimics how the consumers would use the Quiz component
https://github.com/user-attachments/assets/302460c6-5f09-4229-9cb5-1e257d322816
Checklist:
Update index.md
)This PR makes the following changes to the Quiz component:
correctAnswer
prop to each questionvalidateAnswers
function fromuseQuiz
correctAnswerCount
value fromuseQuiz
Screen recording of the With Validation demo, which mimics how the consumers would use the Quiz component
https://github.com/user-attachments/assets/302460c6-5f09-4229-9cb5-1e257d322816