This project is an Create React App - v2.1.1 boilerplate with integration of Redux, React Router, Redux thunk & Reactstrap(Bootstrap v4)
Before starting with project, please headover to CRA documentation.
- Domain-style for code structure
- Clone this repo
https://github.com/mohandere/cra-boilerplate.git
- To run, go to project folder and run
$ yarn install
(if you are using yarn)
- Now start dev server by running -
$ yarn start
- visit - http://localhost:3000/
To create production ready codes -
$ yarn build
- Analyze source code / bundle size
$ yarn analyze
for more commands refer package.json
Before starting development please go through -
- Presentational and Container Components
- All the fundamental React.js concepts, jammed into this single Medium article
- When do I know Iโm ready for Redux?
Refer src/home/
module for an ideal directory structure
Project uses Domain-style
for code structure-
Domain-style : separate folders per feature or domain, possibly with sub-folders per file type
For more details refer /src/home
folder.
Reference -
- http://redux.js.org/docs/faq/CodeStructure.html
- http://engineering.kapost.com/2016/01/organizing-large-react-applications/
Place all common components such as Header/Footer in src/common/components
folder.
- Create a Module/Feature folder at
src/
like - -src/home
Feature folder must contain booststrap file namedindex.js
and css file 'style.css' at root
Like -
src/home/index.js
src/home/style.scss
Next as per need, add sub folders like -
src/home/actions/
src/home/reducers/
src/home/thunks/
src/home/containers/
src/home/components/
- Create folder named
actions
inside Feature folder like -src/home/actions
- Place
actionTypes.js
which contains all actions to be exported
- Create folder named
reducers
inside Feature folder like -src/home/reducers
- Place
index.js
which combines all reducers usingcombineReducers
Refer deployment section from CRA doc.
File an issue here.
MIT