Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 10 months ago

Quiz App made using React (Vite)

react, vite
P
James•85
@NaetharuCodes
A solution to the Frontend Quiz app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

This was a fun challenge. I think the main styling went well, and I had a good time with the code to make the quiz function.

Looking back I think I over-complicated the buttons. I made a single component that could function as both the button and the selection input. But this made it have far too many options, and it would have been a much cleaner solution to separate these two things out into distinct components. I will return to the code and do this at a later time.

If I had more time I would have liked to spend a bit more getting some solid CSS variables in place to start with too, so that the site would be a bit more maintainable. For a tiny app like this the module approach here is fine, but it would present some challenges in a larger project.

What challenges did you encounter, and how did you overcome them?

Figuring out how to represent the pages was the first challenge. I considered routing with URLs but decided that a single page that switches out the components would be better in this case, given the relative simplicity of the app.

The logic for the buttons was fun. Making sure everything took place in the right ordering.

Getting the progress bar perfect was a little bit fiddly, but I am pleased with the results.

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 James'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