How to use the redux-recompose.createReducer function in redux-recompose

To help you get started, we’ve selected a few redux-recompose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Wolox / redux-recompose / example / src / redux / hearthstone / reducer.js View on Github external
import Immutable from 'seamless-immutable';
import { createReducer } from 'redux-recompose';

import { actions } from './actions';

const defaultState = {
  count: 0
};

// No handling of reducer.hearthstone.cards
const reducerDescription = {
  [actions.OTHER_ACTION]: state => state.merge({ count: state.count + 1 })
};

export default createReducer(Immutable(defaultState), reducerDescription);

redux-recompose

A Redux utility belt for reducers and actions. Inspired by acdlite/recompose.

MIT
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis