This project was bootstrapped with Create React App.
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.
Added enzyme
and using jest
snapshot testing.
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: to create a react component. first you should change directory to src/components!
Running this would create a component directory with the name passed as argument and add 3 files same as the component name
In that directory, for ex.
cd src/components
npm run scaffold App
would create App folder and add 3 files,
App.js (with default react component), App.css, App.spec.js (with default snapshot test)
Added linting and prettier to the project for consistency of code and js coding conventions
Running this script would throw errors in js like extra spaces and trailing commas etc.
To fix mistakes use npm run lint -- --fix
this would fix most of common mistakes
This would run build and deploy this project to github pages here
Before every commit git hooks would test lint the code
Before every push all test cases would be run.
We use husky to run node scripts npm run lint
and npm run test:ci
on pre-commit and pre-push respectively.
More on Git Hooks
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.