Skip to content
Submitted over 2 years ago

Quiz App with React and Redux

react, redux
LVL 5
Abel Muro1,960
@AbelMuro
A solution to the Frontend Quiz app challenge

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

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