This app was created to assist students in practicing their addition in a game-ified manner to inspire attainment of basic math skills. The app will generate two random whole numbers as well as the correct sum of the two numbers, maintaining all 3 as internal state but only displaying to the user the two randomly generated numbers. The user enters an answer, and their answer is checked against the sum previously generated and stored. An alert will display after the submit button is clicked telling the user whether or not they answered correctly.
This project was bootstrapped with Create React App
node.js is of course required and likely already installed if you are wanting to contribute to this codebase. If not, download node here.
You can do a global install by running npm install -g create-react-app
.
Axios is the HTTP client communicating with the API in this app because it allows a more performant, powerful HTTP requests than vanilla JS. Install Axios by running npm i axios
in your integrated terminal. Then, simply use an import statement at the top of the .js file where
Within the terminal of the project directory, you can run:
This runs the app in development mode. Then, open a browser window and navigate to http://localhost:3000 to view the app in your browser.
Due to the nature of React, the page will reload and update while you make changes to the code.
This will launch 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.
The React app will be correctly bundled in production mode and optimally performant.
The app is at this point ready for deployment.
Review 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.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify