Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
redux-action-chain-hor
Advanced tools
Higher-order reducer which makes possible dispatching an array of actions at once.
Higher-order reducer which makes possible dispatching an array of actions at once.
This package provides a Redux action creator and higher-order reducer handling that action which allows to dispatch an array of actions notifying connected components only once.
It should be used like this:
// during store creation
import { createStore } from 'redux'
import { supportActionChain } from 'redux-action-chain-hor'
const reducer = (state, action) => {
// reducer code goes here
}
const store = createStore(
// wrap your reducer with supportActionChain
supportActionChain(reducer)
)
// -------------------------
// when dispatching multiple actions
// use `actionChain` action creator
import actionChain from 'redux-action-chain-hor'
dispatch(actionChain([action1(), action2('foo', 123), action3('boo')]))
In the example above reducers for actions action1
, action2
, action3
will be executed in order, passing state from the previous reducer to the next one. At the end Redux will notify connected components (only once!).
Dispatching multiple redux actions sequentially results in multiple updates of connected components.
For example, if one dispatches redux actions action1
, action2
, action3
like this:
dispatch(action1())
dispatch(action2('foo', 123))
dispatch(action3('boo'))
components connected to Redux store will be notified 3 times - once after each dispatch
call.
Depending on connected components that can have negative impact on performance.
FAQs
Higher-order reducer which makes possible dispatching an array of actions at once.
The npm package redux-action-chain-hor receives a total of 19 weekly downloads. As such, redux-action-chain-hor popularity was classified as not popular.
We found that redux-action-chain-hor 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.