A simple React Quiz with 15 questions, each with 4 possible answers.
To learn and practice: useReducer, the Context API, set up a basic backend using Express, deploy on Vercel.
https://react-quiz-6l23.vercel.app/
A 2min30sec countdown automatically starts when clicking on the Start button. Upon completion or if time runs out, user gets redirected to results screen displaying total amount of points earned.
Points are allocated per difficulty level with a total possible score of 280 points. A highscore is saved and updated if latest score is higher than previous highscore.
User can re-take the quiz as many times he/she wishes by clicking on the Restart button, and can exit the quiz at any time by clicking on the Cancel button.
This project was bootstrapped with Vite.
In the server directory, you can run:
Launches the quiz questions API on http://localhost:8000/api/v1/questions.
In client/src/context/QuizContext.jsx, you can change BASE_URL to 'http://localhost:8000'
In the client directory, you can run:
Runs the app in the development mode.
Open http://localhost:5173 to view it in your browser.