https://github.com/vsbron/course-react2023-react-quiz
https://github.com/vsbron/course-react2023-react-quiz
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/vsbron/course-react2023-react-quiz
- Owner: vsbron
- Archived: true
- Created: 2023-11-05T12:35:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-21T14:57:25.000Z (over 2 years ago)
- Last Synced: 2025-03-01T09:47:09.510Z (over 1 year ago)
- Language: JavaScript
- Size: 195 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React quiz app
React SPA that lets the player to take a small React quiz.
## Features
- The quiz of 15 questions;
- Progress bar that displays current auestion number and amount of points received;
- Finished game screen with the high score and option to restart the game;
- The timer that finishes the game when expires;
## Details
- Questions are fetched from fake API using json-server (Must run "npm run server" for quiz to work);
- useReducer hook is used to store and update the state;
- Initially the number of seconds is calculated based on number of questions;
- Seconds are reduced via useInterval function, game is finished when seconds reach zero;
- State is managed by Context API;