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.
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.
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
- Axios
- Bootstrap
- Reactstrap
- Redux
- React Redux
- Redux Form
- Redux Logger
- Redux Thunk
- React Router Dom
- Formik
npx create-react-app my-app
cd my-app
npm start
npm install react-scripts@latest
You would need to install an ESLint plugin for your editor first. Then, add a file called .eslintrc.json to the project root:
{
"extends": "react-app",
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
You most likely want to apply the Prettier formatting whenever you save your files. To do so, add the following to your Visual Studio Code Workspace Settings:
"editor.formatOnSave": true
Visual Studio Code You would need to have the latest version of VS Code and VS Code Chrome Debugger Extension installed.
Then add the block below to your launch.json file and put it inside the .vscode folder in your app’s root directory.
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
}
]
}
Note: the URL may be different if you've made adjustments via the HOST or PORT environment variables.
Start your app by running npm start, and start debugging in VS Code by pressing F5 or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
npm install --save husky lint-staged prettier
Add the following field to the package.json section:
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
Next we add a 'lint-staged' field to the package.json, for example:
"lint-staged": {
"src/\*_/_.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --single-quote --write",
"git add"
]
},
https://medium.com/technical-credit/using-prettier-with-vs-code-and-create-react-app-67c2449b9d08
You may create subdirectories inside src. For faster rebuilds, only files inside src are processed by Webpack. You need to put any JS and CSS files inside src, otherwise Webpack won’t see them.
Only files inside public can be used from public/index.html. Read instructions below for using assets from JavaScript and HTML.
You can, however, create more top-level directories. They will not be included in the production build so you can use them for things like documentation.
npm start
npm test
npm run build
npm run analyze
- https://github.com/piotrwitek/react-redux-typescript-guide
- https://medium.com/swinginc/react-redux-typescript-into-the-better-frontend-tutorial-d32f46e97995
- https://facebook.github.io/create-react-app/docs/adding-flow
- https://github.com/okonet/lint-staged
- https://prettier.io/
- https://github.com/typicode/husky
- https://codesandbox.io/s/clever-snyder-1u410?fontsize=14
- https://codesandbox.io/s/x77o7v4kxz?from-embed
- https://codesandbox.io/s/ookp34xl89?from-embed
- Form meta
- Toogle
- Date Range Picker
- Text Mask
- Pattern
- Dynamic For Style (Inline, Horizontal, etc.)
- Sidebar
- Theme Switcher
- Toast