0.1.2 • Published 6 years ago
cra-template-dbenfouzari v0.1.2
cra-template-dbenfouzari
This is a template for Create React App.
To use this template, add --template cra-template-dbenfouzari when creating a new app.
For example:
yarn create react-app my-app --template cra-template-dbenfouzariWhat's inside?
It includes some great stuff :
- ESLint
- Prettier
- Stylelint
- Redux
- SCSS
- Storybook
How to?
Bootstrap your project
Simply run
yarn create react-app my-app --template cra-template-dbenfouzariAnd that's it! You get a new project based on Create React App with more opiniated utils.
Create a page
Let's say you want to create a Login page. Please create a folder login under src/pages/.
This folder may contain :
login.tsx,- a
login.stories.tsxthat will be used for rendering that page into Storybook, - a
login.test.tsxthat will be a test file, - a
login.module.(s)cssto style your page, - and an
index.tsfile that justexport { default } from './login';to allow external files to import it.
Create a Redux' module
Let's say you want to map your login form into Redux.
You can do this by creating a file src/modules/login.ts. It will contain similar code as counter.ts file.
Check out src/pages/about to see how Redux is used.