Gathering detailed insights and metrics for react-redux-fetch-by-actions
Gathering detailed insights and metrics for react-redux-fetch-by-actions
Gathering detailed insights and metrics for react-redux-fetch-by-actions
Gathering detailed insights and metrics for react-redux-fetch-by-actions
react utils(hoc, hook, etc) for fetching by declaring redux action types
npm install react-redux-fetch-by-actions
Typescript
Module System
Node Version
NPM Version
TypeScript (71.53%)
JavaScript (28.47%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
6 Stars
37 Commits
1 Watchers
14 Branches
1 Contributors
Updated on Oct 27, 2021
Latest Version
0.0.5
Package Id
react-redux-fetch-by-actions@0.0.5
Unpacked Size
11.98 kB
Size
3.90 kB
File Count
7
NPM Version
6.4.1
Node Version
10.15.3
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
24
Lightweight(1kb gzip) helpers (hook, hoc) for dispatching action types and handling loading inside your components. Based on redux-promise-listener and react-redux-promise-listener-hook packages
npm i react-redux-fetch-by-actions
// store.js
import { createStore, applyMiddleware } from 'redux';
import createReduxPromiseListener from 'redux-promise-listener';
const reduxPromiseListener = createReduxPromiseListener();
const store = createStore(
reducer,
initialState,
applyMiddleware(...otherMiddleware, reduxPromiseListener.middleware),
);
export const promiseListener = reduxPromiseListener; // <---- ⚠️ IMPORTANT ⚠️
export default store;
// fetchService.js
import createFetch from 'react-redux-fetch-by-actions';
import { promiseListener } from 'store';
const { fetchDecorator, useFetch } = createFetch(promiseListener);
export { fetchDecorator, useFetch };
// Component.jsx
import React from 'react';
import Loader from 'components/Loader';
import { useDidUpdate } from 'some-hooks-lib';
import { useFetch } from 'fetchService';
const Component = ({ id }) => {
const { data, loading, fetch } = useFetch({
start: 'start-action-type',
resolve: 'resolve-action-type',
payload: { id }, // payload to be passed in start action, merged with prevoius data state
});
useDidUpdate(() => { fetch() }, [id]); // fetch on props update, optional
if (loading) return <Loader />;
return (
<div>
{data}
<button onClick={fetch}>repeat</button> // mutation, fetch as a callback
</div>
);
};
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/25 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
Reason
23 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