Correct Answers

Easy
40
2
59.1% Acceptance

Evan has built this good looking Quiz App. He's happy that he made this far in his learning journey with React & TypeScript. The code written by him may not be perfect, the quiz functionality seems to work fine.

However, taking a closer look while using his app, he figured out that something is wrong. The correct answer count is not being updated as expected. Selecting the correct option does not seem to increment the correct answer count.

Can you help Evan figure out what's wrong with his code? You would have to go through the logic written by Evan and find out why the count is not increment. You are not supposed to update the data or any other content or data that is part of this app.

Evan has made only two files for this Quiz app.

  • src/App.tsx
  • src/components/Question.tsx

You would have to go through the code written by him to understand the app and debug the problem and fix it. Once you've fixed the code, and running the tests should pass your challenge.

All the best!

If you're not familiar with TypeScript, don't worry. You should be able to solve this challenge without understanding the TypeScript parts of this app.

Do not remove any data-testid properties added in the code, removing them would fail the tests immediately. They're used for testing the code written by you