A simple trivia app built with React.
This app was built using create-react-app (CRA). Follow the steps below to setup the project with the proper dependencies. You will not need to install CRA in order to make this app work.
- Create a forked copy of this project.
- Clone your OWN version of the repository in your terminal.
- Download project dependencies by running one of these two commands
yarn
ornpm install
(I personally use npm 🤷🏾) - Using the same command tool (yarn or npm) start up the app using
yarn start
ornpm start
- Take a peak under the hood 👩🏾🔧
- Clone down this version of the repository in your terminal.
- Download project dependencies by running one of these two commands
yarn
ornpm install
(I personally use npm 🤷🏾) - Using the same command tool (yarn or npm) start up the app using
yarn start
ornpm start
- Take a peak under the hood 👩🏾🔧
-
Retrieves trivia questions and answers from this API: https://opentdb.com/api_config.php
-
Gives the user an opportunity to answer those questions and get feedback on whether or not they answered correctly
-
Provides the user with some level of choice over how they structure their game (i.e. by topic, number of questions, or difficulty)
Holds simple, smaller components used for trivia settings, and to display individual question and questions carousel. Also holds styles css file.
Holds the hooks used for end of game staging and whether or not user has chosen the correct answer.
Staging area for two modes of app, game set up and game play. Smaller components are imported into these files and returned as part of the larger components.
All state is managed in redux folder. File structure is set up to allow for additions to state. Actions, reducers & utils placed in folder within redux folder that corresponds with the area of state that is being managed.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
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.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Feel free to ask Afia Caruso for support if you have any trouble navigating this app.