Welcome to DayOne.pl React starter kit. The purpose of this project is to get you up and running with React JS development as fast as possible but also to stay with you when you go to production.
To start developing your React app you need to:
- Install Node JS (latest LTS version will be best)
- Clone this repo or download contents as ZIP
- Open terminal and navigate to project
- Run
npm install
to fetch all dependencies - Run
npm start
to start development server - Go to http://localhost:8080/webpack-dev-server/
- Edit some files (page will auto-reload after you change any source file)
You have everything configured to use React with JSX and ES6. There's a Babel transpiler configured with es2015 and stage-2 plugins installed, so you can use things like lambdas, destructuring and classes.
For more info about which features are enabled check: preset-es2015 preset-stage-2
You can immediately use all utilities and functional goodies from Lodash 4.
just import {map} from 'lodash'
or import {map} from 'lodash/fp'
, whichever style you prefer.
There's also a Lodash Babel plugin installed, so your bundle will only contain stuff that you really used (thanks to Webpack tree shaking)
We use redux to manage application state where component state is not enough. We have also configured Chrome Redux dev tools so you can see what's going on in your store while in development. Don't worry, we remove it in production build, so that performance is still nice.
- Scss for nice stylesheet
- React-intl for localization
- React router 4 so you can keep nice URLs and make your app bookmarkable
- Classnames for declarative css class selection logic
- Jest and Enzyme for testing
- Redux thunk and promise middleware for backend calls
- ...and some more, check [package.json] for details
This starter kit is also configured to prepare a production build:
- Performance optimized output code
- Uglification and minification enabled
console.log
statements removalNODE_ENV=production
Run npm run-script dist
and check dist
folder for files.
Marek Piechut @marekpiechut Bartek Witczak @bartekwitczak
DOS starter kit is licensed under the MIT License so you can use it in free, opensource and commercial projects. Whichever you like. See [LICENSE.md] for details
In dev mode you might notice an error about styles.css file missing. It's nothing to be worried about. In dev mode all stylesheets are inlined and no style.css file is generated. Only in production build we extract all styles to external file and that's when it will be used.