Reducer.md

April 21, 2017 ยท View on GitHub

Reducer

The reducer will handle all actions dispatched by the action creators.

Configuration

import { reducer } from 'redux-clerk'

const todos = reducer({
  actionPrefix: 'TODOS'
})

export default todos

Usage

Once the reducer is configured, it will need to be added to the root reducer.

import todos from './reducers/todos'

const rootReducer = combineReducers({
  ...
  todos
  ...
})

export default rootReducer