Get a react/redux playground/project up and running in < 5 mins. Quickly create components, reducers, write tests, lint and apply style sharpish. Happy coding :)
Setup:
$ git clone ...
npm run jumpstart
*tested with node -v 6 & 7
*npm run jumpstart
will run install and start a dev environment
- React
- Redux
- Redux Router
- Redux Thunk
- Redux Dev Tools
- ES6 w/ Babel
- Webpack 2
- Webpack dashboard
- Hot Module Replacement
- Eslint (air bnb standard)
- SASS
- Mocha
$ npm run dev
Build will be in the ./build
folder.
To create and bundle a build simply run:
$ npm run build
To create and bundle a build then be able to preview it locally run:
$ npm run production
- Duplicate the folder
_template
within the ./src/screens folder - Rename the new folder your desired screen name or whatever
- Rename the
_template.scss
- Change
_template
references
- In
./router/createRoutes.js
import your new screen (e.g.import About from '../About/Page.react
;) - Finally add a new Route to the return value of createRoutes (e.g.
<Route path="about" component={About}
/>)
- Open
./components/Navigation/navigation.react.js
- Create an li element with your params e.g.
<li><Link to={'/about'} className={this.isActiveRoute('about')}>About</Link></li>
- Duplicate the folder '_template' within the ./src/reducers folder
- Set up your actions & reducers
- Import the actions.js file into ./src/reducers/mapDispatchToProps
- Import the reducer.js into ./src/reducers/appReducer.js
Everyone brings something awesome to the party so please raise any suggestions and contribute.
So...
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D