Skip to content

alicefrsr/react-quiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

React Quiz

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.

Live site:

https://react-quiz-6l23.vercel.app/

Functionalities:

Timer:

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.

Score:

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.

Available Scripts

This project was bootstrapped with Vite.

In the server directory, you can run:

npm install

npm install nodemon

npm run express-server

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:

npm install

npm run dev

Runs the app in the development mode.
Open http://localhost:5173 to view it in your browser.

About

A simple React quiz, built with React + a RESTful API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published