Useful commands:
-
yarn
to install dependencies -
yarn start
to start a local dev-server -
yarn build
to build a minified version of the code, for production use! -
yarn test
to launch tests in watch mode -
yarn generate
to generate a new component or a new page. You will be prompted the following questions:- Do you want a page or a component?
- What is the name of the component?
- What is the type of the component? Choose between PureComponents, Components and stateless functions for your React component.
- Do you want to connect your component to the Redux store? Use Redux to handle your global state.
- Do you want to use react-intl? Use react-intl to handle the translations within your application.
- Do you want to use styled-components? Use styled-components to easily style your components using a CSS syntax.
- Do you want snapshot tests? _Snapshot tests allow you to easily lock the comportment of a component.
Other useful commands:
-
yarn lint:fix
to automatically fix linting errors -
yarn test:coverage
to generate the coverage -
yarn resolve-audit --yarn
to resolve vulnerable dependencies -
yarn analyze
to analyze the production bundle size
For more see create-react-app documentation