New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@micro-js/combine-reducers

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@micro-js/combine-reducers

Combines an object of reducers

1.0.3
latest
Source
npm
Version published
Maintainers
1
Created
Source

combine-reducers

Build status Git tag NPM version Code style

Combines an object of reducers together to form a single, composite reducer. This function is identical to the one provided by https://github.com/rackt/redux but it doesn't do the sanity checks that redux does, which allows you to do a few things like having multiple root reducers combined into one that you can't do with redux's assertions.

Installation

$ npm install @micro-js/combine-reducers

Usage

var combineReducers = require('@micro-js/combine-reducers')

combineReducers({
  counter1: counterReducer,
  counter2: counterReducer
})

function counterReducer (state, action) {
  if (action.type === INCREMENT) {
    return ++state
  }

  return state
}

API

combineReducers(reducers)

  • reducers - An object containing a map of reducers to property names

Returns: The combined reducer map as a single reducing function.

License

MIT

FAQs

Package last updated on 06 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts