Redux Store

Your project is preconfigured with a Redux store, available both at the server and the client.

Reducers

The store has a combineReducers as the root reducer, and you can add your reducers to it by exporting an object from src/store/reducers.js.

In addittion to your reducers, there are a few already preconfigured:

You can override them by creating a key with the same name, but things can fail if you break their contract.

Middlewares

If you need to add any extra Redux middlewares to the store, you can create src/store/middlewares.js and export an array of middlewares to configure them. The thunk middleware will be added automatically.

Actions

There are some actions that get dispatched during various stages of the render process, which can be used on your reducers:

You can import their action types like this:

import { CLEANUP } from 'universal-scripts'

Next steps

Now that you know how the store works, you can learn more about the build system.