Demo: https://codesandbox.io/s/y65lw
Tests are included in the project folder, but not at the demo site above.
This project was bootstrapped with Create React App. You can find the most recent version of this guide here. Below are commands for some common tasks.
yarn or npm install to add the required dependencies.
yarn start or npm start to run the app in development mode.
Open http://localhost:3000 to view it in your browser.
To make the development server only binds to localhost, you can create an .env file at the root of the project directory and add HOST=localhost in the .env file.
yarn test or npm test to run tests in the interactive watch mode.
yarn build or npm run build to build the app for production to the build folder.
yarn serve or npm run serve to serve build folder.
yarn eject to remove the single build dependency from your project. 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.
Resources and documentations:
Create React App
React
testing-library
@testing-library/react
Jest API