
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
redux-chain
Advanced tools
Redux-chain allows you to dispatch multiple actions calls using a single dispatch call.
import { chain } from 'redux-chain'
dispatch(chain(
signIn(),
clickOnButton()
signOut(),
));
Download
npm install --save redux-chain
Build
npm run build
Import & add the middleware to your Redux store
import { createStore, applyMiddleware } from 'redux';
import { chainMiddleware } from 'redux-chain';
import rootReducer from './reducers/index';
const store = createStore(
rootReducer,
applyMiddleware(chainMiddleware)
);
To enable thunk actions (or other useful middleware), simply apply redux-chain before other middleware.
import { createStore, applyMiddleware } from 'redux';
import { chainMiddleware } from 'redux-chain';
import thunk from 'redux-thunk';
import rootReducer from './reducers/index';
const middleware = [chainMiddleware, thunk]; // not: [thunk, chainMiddleware]
const store = createStore(
rootReducer,
applyMiddleware(middleware)
);
I love to combine redux-chain
with novux
(github.com/neednova/novux), a tool that helps declare state changes simply, clearly and quickly.
import { chain } from 'redux-chain'
import { update, reset } from 'novux'
const todos = [1, 2];
dispatch(chain(
update('todos', 'Add a todo', {
todos: todos.push(3);
}),
reset('todos', 'Reset todos', {
reset: ['todos'],
}),
));
FAQs
Chain multiple actions in a single dispatch call
The npm package redux-chain receives a total of 22 weekly downloads. As such, redux-chain popularity was classified as not popular.
We found that redux-chain 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.