Gathering detailed insights and metrics for react-axios-fetcher
Gathering detailed insights and metrics for react-axios-fetcher
Gathering detailed insights and metrics for react-axios-fetcher
Gathering detailed insights and metrics for react-axios-fetcher
use-rq-fetcher
the hook for get data with axios and react query
fetcher-safe
`fetcher-safe` is a React custom hook designed to simplify the management of asynchronous data fetching in your React applications. It provides a convenient way to handle loading states, errors, and successful data retrieval.
multi-api-fetcher
An npm package for fetching data from multiple APIs using TanStack Query
npm install react-axios-fetcher
Typescript
Module System
Node Version
NPM Version
67.7
Supply Chain
82.3
Quality
74.2
Maintenance
50
Vulnerability
99.6
License
JavaScript (70.37%)
CSS (17.17%)
HTML (12.46%)
Total Downloads
1,225
Last Day
1
Last Week
2
Last Month
11
Last Year
90
1 Stars
11 Commits
2 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.1.1
Package Id
react-axios-fetcher@0.1.1
Unpacked Size
10.33 kB
Size
3.49 kB
File Count
12
NPM Version
6.4.1
Node Version
10.12.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
175%
11
Compared to previous month
Last year
-8.2%
90
Compared to previous year
A simple and lightweight component for fetching data without writing tones of template code. Uses axios. Features:
1npm install react-axios-fetcher
You can pass function as a children or pass prop component
to render received data:
1import Fetcher from 'react-axios-fetcher'; 2 3const ShowData = ({ data, refresh }) => (...) 4 5const Component1 = () => ( 6 <Fetcher url="https://randomuser.me/api"> 7 ({ data, refresh }) => <ShowData data={data} refresh={refresh} /> 8 </Fetcher> 9) 10 11const Component2 = () => ( 12 <Fetcher url="https://randomuser.me/api" component={ShowData} /> 13)
See more examples at Demo.
Prop | Type | Default | Description |
---|---|---|---|
url | string | - | Url to fetch data. Required if not defined in config. |
config | AxiosRequestConfig | - | Axios config to rewrite defaults. You can redefine http method here. |
children | ({ data: any, refresh: () => void }) => React.Element | - | Function to render when fetch is succeeded. |
component | React.Component<{ data: any, refresh: () => void }> | Success | Component to render when fetch succeeded and children aren't passed. |
error | React.Component<{ error: AxiosError, refresh: () => void }> | Error | Component to render when fetch failed. |
loader | React.Component<{ refresh: () => void }> | Loader | Component to render when fetch is in process. |
onLoading | () => void | - | Callback would be invoked when fetch started. |
onError | (error) => void | - | Callback would be invoked when failed. |
onSuccess | (data) => void | - | Callback would be invoked when succeeded. |
getDataFromResponse | (response: AxiosResponse) => any | ({ data }) => data | Get needed data from received response. |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/11 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 SAST tool detected
Details
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
140 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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