reducer

Get the redux-reducer for integration with the store. Variable, not a function.

// Example:

// In the file where the wrapper is defined:
// ...
export const reducer = exampleWrapper.reducer;

//... then in your reducer-collection ...
import { reducer as example } from "./Example";
export default combineReducers({ example });

//... and finally in the store:
import globalReducers from "./global-reducer-collection";
const createStoreWithMiddleware = compose(applyMiddleware(logger, sagaMiddleware))(createStore);
const store = createStoreWithMiddleware(globalReducers, {});

Last updated