Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Quiz App with React and Redux

react, redux
Abel Muro•1,890
@AbelMuro
A solution to the Frontend Quiz app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This was a really fun project! This app was a bit tricky at first since I've never developed a quiz app before, but I learned a lot of different techniques to implement a component and re-use it.

The hardest part was implementing a component that displays ALL the questions from a specific quiz. I had to make the component dynamic so that it can render all the questions with their respective choices.

I ended up using Redux to keep track of the question that the user is currently on. When the user clicks on the 'Next Question' button, it updates the global store to ensure that the state 'points' to the next question.

For example, when the user starts the quiz, the global store has a property called 'currentQuestionNumber' and it is initialized to 0. Once the user clicks on 'Next Question', then the currentQuestionNumber will be incremented by 1. Now we have ensured that the state points to the next question.

I HIGHLY recommend you try developing this app!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Abel Muro's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub