- Centralizes logic for creating actions
- Actions are plain javascript objects with a
type
property and optional payload - Actions conform to the flux standard action spec
- Support async actions using thunk middleware
- Pure functions that return new state based on current state and dispatched action
- State shape is defined by composing reducers into a hierarchy with a single root
- Provides API to
dispatch()
actions,getState()
andsubscribe()
to changes in state - Allows wrapping dispatch calls with middleware
- Centralizes logic for accessing and deriving properties from state
- Decouples view from state
- Composed of smart components that know about the store and dumb components that don't
- Uses middleware to redraw after each dispatch
- Install nvm
$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh && source ~/.nvm/nvm.sh
- Install node and set default
$ nvm install stable && nvm alias default stable
- Install local node packages
$ npm install
- Start the server in development mode...
$ npm start
- ...and open the app
- Build the assets
$ npm run build
- Start the server in production mode...
$ NODE_ENV=production npm start
- ...and open the app
Code should follow the style guide outlined here
In order to keep the code clean and free of bugs please run tests before every commit
$ npm test
You can run live linting and testing using the following command
$ npm run test:watch