Gathering detailed insights and metrics for redux-promise
Gathering detailed insights and metrics for redux-promise
Gathering detailed insights and metrics for redux-promise
Gathering detailed insights and metrics for redux-promise
redux-promise-middleware
Enables simple, yet robust handling of async action creators in Redux
@types/redux-promise
TypeScript definitions for redux-promise
@redux-saga/deferred
Helper for creating "exposed" promise object (with resolve & reject methods).
@redux-saga/delay-p
Promisified setTimeout
npm install redux-promise
Typescript
Module System
Node Version
NPM Version
98.6
Supply Chain
80.4
Quality
77.4
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2,662 Stars
39 Commits
119 Forks
41 Watchers
16 Branches
10 Contributors
Updated on Jul 10, 2025
Latest Version
0.6.0
Package Id
redux-promise@0.6.0
Size
3.13 kB
NPM Version
5.8.0
Node Version
8.9.4
Published on
May 14, 2018
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
FSA-compliant promise middleware for Redux.
1npm install --save redux-promise
1import promiseMiddleware from 'redux-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
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.
Because it supports FSA actions, you can use redux-promise in combination with redux-actions.
This works just like in Flummox:
1createAction('FETCH_THING', async id => {
2 const result = await somePromise;
3 return result.someValue;
4});
Unlike Flummox, it will not perform a dispatch at the beginning of the operation, only at the end. We're still looking into the best way to deal with optimistic updates. If you have a suggestion, let me know.
Say you have an API module that sends requests to a server. This is a common pattern in Flux apps. Assuming your module supports promises, it's really easy to create action creators that wrap around your API:
1import { WebAPI } from '../utils/WebAPI'; 2 3export const getThing = createAction('GET_THING', WebAPI.getThing); 4export const createThing = createAction('POST_THING', WebAPI.createThing); 5export const updateThing = createAction('UPDATE_THING', WebAPI.updateThing); 6export const deleteThing = createAction('DELETE_THING', WebAPI.deleteThing);
(You'll probably notice how this could be simplified even further using something like lodash's mapValues()
.)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/27 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
74 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More