Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
redux-immutable-combine-reducers
Advanced tools
Readme
A Redux combineReducers that returns an Immutable Map
npm install --save redux-immutable-combine-reducers
To have a root that is also an Immutable Map. Redux's combineReducers works with Immutable, but the root is still a plain object. This utility will return an Immutable Map instead.
import combineReducers from 'redux-immutable-combine-reducers';
import {Map} from 'immutable';
function counter(state = 0, action = {}) {
switch (action.type) {
case 'INCREMENT':
return state + 1;
case 'DECREMENT':
return state - 1;
default:
return state;
}
}
function filter(state = '', action = {}) {
switch (action.type) {
case 'SET_FILTER':
return action.filter;
default:
return state;
}
}
const objReducer = combineReducer({counter, filter});
const objState = objReducer();
console.log(objState.get('counter'));
// => 0
const mapReducer = combineReducer(Map({counter, filter}));
const mapState = mapReducer();
console.log(mapState.get('counter'));
// => 0
Returns a reducer function that always returns an Immutable.Map.
Type: object
| Immutable.Map
An object
or Immutable.Map
with all keys or entries being functions.
MIT © Dustin Specker
FAQs
A Redux combineReducers that returns an Immutable Map
The npm package redux-immutable-combine-reducers receives a total of 24 weekly downloads. As such, redux-immutable-combine-reducers popularity was classified as not popular.
We found that redux-immutable-combine-reducers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.