The project is structured as follows:
src/components
: React components are reusable pieces of the application (such as a button).
src/pages
: React pages correspond to the application pages (such as the home page). Sub-components of these pages should be in sub-folders of each page, if they cannot be reused anywhere else.
src/redux
: Redux actions/reducers/sagas/selectors are all grouped by page in this folder (following the ducks pattern). Learn more about Redux by reading the documentation.
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:
Other useful commands:
yarn flow
to generate flow configuration for your node_modules
yarn lint:fix
to automatically fix linting errors
yarn test:coverage
to generate the coverage
yarn nsp
to spot security breaches in your application
yarn analyze
to analyze the production bundle size
For more see create-react-app documentation