Gathering detailed insights and metrics for redux-act-dispatch-free
Gathering detailed insights and metrics for redux-act-dispatch-free
npm install redux-act-dispatch-free
Typescript
Module System
Node Version
NPM Version
69.8
Supply Chain
98.8
Quality
75.7
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
10,822
Last Day
1
Last Week
3
Last Month
9
Last Year
290
4 Stars
17 Commits
3 Forks
1 Watchers
1 Branches
2 Contributors
Updated on May 05, 2022
Minified
Minified + Gzipped
Latest Version
1.3.0
Package Id
redux-act-dispatch-free@1.3.0
Size
4.97 kB
NPM Version
5.5.1
Node Version
8.4.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
200%
3
Compared to previous week
Last Month
-83%
9
Compared to previous month
Last Year
-1%
290
Compared to previous year
2
redux-act-dispatch-free
extendsredux-act
so that you can call async actions without dispatch.
So it allows you to access a bound store from an asyncAction
1npm install redux-act-dispatch-free --save
createAsyncCycle
new at 17 nov 2017
1// userActions.js 2import { createAsyncCycle } from 'redux-act-dispatch-free'; 3 4// You can return any async (or not) function 5// and thay will automaticaly dispatch all async lifecicle functions 6export const [fetchGetUserData, successGetUserData, errorGetUserData] = createAsyncCycle( 7 'get user data', 8 store => () => api.getUserData(store.getState().app.user.uid) 9);
fetchGetUserData
will generate:"[fetch] get user data"
...after some time...
"[success] get user data" or "[error] get user data"
1export const [fetchGetUserData, successGetUserData, errorGetUserData] = createAsyncCycle( 2 'get user data', 3 store => () => api.getUserData(store.getState().app.user.uid), 4 // success 5 payload => payload.data, 6 // error 7 error => error.response.status 8);
1// userActions.js 2import { createAction } from 'redux-act'; 3import { createAsyncAction } from 'redux-act-dispatch-free'; 4 5export const responseUserInfo = createAction('response user Info'); 6export const errorResponceUserInfo = createAction('error response user Info'); 7 8export const fetchUserInfo = createAsyncAction( 9 'request user data', 10 store => async userId => { 11 try { 12 const response = await api.getUser(userId); 13 responceUserInfo(response.data); 14 } catch (e) { 15 console.error(e) 16 errorResponceUserInfo(e.message ? e.message : e); 17 } 18 } 19);
1// initStore.js 2import { asyncActionsCallerMiddleware } from 'redux-act-dispatch-free'; 3import { assignAll } from 'redux-act'; 4import actions from 'actions'; 5//... 6 const store = createStore( 7 reducers, 8 applyMiddleware(asyncActionsCallerMiddleware) 9 ); 10 assignAll(actions, store); 11//...
1// Component.jsx 2import { fetchUserInfo } from 'actions/userActions'; 3//... 4 componentDidMount = () => { 5 fetchUserInfo(this.props.yuerId) 6 }; 7//...
Attention: bindAll and assignAll do not work with SSR
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 1/14 approved changesets -- score normalized to 0
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
license file not detected
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
Score
Last Scanned on 2025-03-10
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