VanIro / react-quiz-app

This is an app which uses a question collection, and plays out a quiz from those.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-quiz-app

This is an app which uses a question collection, and plays out a quiz from those.

'question.js' contains the collection of questions, which is used as the source of questions.

Components created

  • Quiz
  • Setup_form
  • Question
  • QuizNav
  • Card

Features used:

  • useState
  • useEffect
  • useRef

Challenging Parts

  • Question Navigation feature while maintaining the state of selected answers

Solution

  • Store the state of all Questions in a parent container, and pass each question's state to it through props.

Screenshots

Setup Round

image

Questions Round

image

Score

image

Available Scripts

In the project directory, you can run:

npm install react

Installs the React library.

npm start

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

With hot reload.

npm test

Launches the test runner in the interactive watch mode.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\

About

This is an app which uses a question collection, and plays out a quiz from those.


Languages

Language:JavaScript 73.1%Language:CSS 20.8%Language:HTML 6.1%