This is a quiz app that uses the public Trivia API to generate questions for users. Users can select a quiz category, difficulty level, and number of questions (up to a maximum of 10) before starting the quiz. At the end of the quiz, users can view their score and restart the quiz if they choose.
To get started with this app, follow the steps below:
- Clone this repository to your local machine using
git clone https://github.com/your-username/trivia-quiz-app.git
. - Install the required dependencies by running
yarn install
. - Start the app by running
yarn start
. - Run
yarn test
to test all instances - Navigate to
http://localhost:3000
in your browser to view the app.
The project is structured using a common React project structure, with files and directories organized in a way that promotes code reusability and maintainability. Below is a breakdown of the directories and their purposes:
src/assets
src/components
src/helpers
src/hooks
src/layout
src/pages
src/routes
src/styles
src/utils
By organizing files and directories in this way, the project is kept modular and maintainable, with clearly defined responsibilities for each file and directory.
This App was tested using Jest combined with react testing library
Below are the components / hook that was tested
components/Button
components/Card
components/Input
components/Quiz
hooks/useFetch
App is deployed on Netlify and can be accessed here