Why Redux?
General idea
Let’s reduxify our app
You can now remove events and flux from the package.json.
And let’s add redux dependencies to our package.json by running: npm install –save redux react-redux redux-router redux-thunk.
Dispatcher
Actually dispatcher would not be needed anymore, so we can remove it:
rm src/AppDispatcher.js
Store
We will have one store class, but we will have two instances – one for client and one for server side:
Reducers
Action Types
Action Creators
Submission Page
Creating store
Client side
Server side
Full rendering server side
Full code accessible here Read all »