
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
redux-promise-es
Advanced tools
npm install --save redux-promise-es
import promiseMiddleware from 'redux-promise-es';
import { createPromiseMiddleware } from 'redux-promise-es';
dispatch(
new Promise(resolve => {
resolve({
type: 'ACTION_TYPE',
payload: new Promise()
});
})
);
//or
dispatch({
type: 'ACTION_TYPE',
payload: new Promise()
});
The default export is a middleware function. If it receives a promise, it will dispatch the resolved value of the promise. It will not dispatch anything if the promise rejects.
If it receives an Flux Standard Action whose payload is a promise, it will either
createPromiseMiddleware(true), immediately dispatch a copy of the action.status to success.status to error.The middleware returns a promise to the caller so that it can wait for the operation to finish before continuing. This is especially useful for server-side rendering. If you find that a promise is not being returned, ensure that all middleware before it in the chain is also returning its next() call to the caller.
lodash-es, build size package reduce 60kb (redux-promise will package the entire lodash).createPromiseMiddleware(true), immediately dispatch a copy of the action ({ type, loading: true }).FAQs
FSA-compliant promise middleware for Redux without lodash.
We found that redux-promise-es 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.