
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-native-fetch
Advanced tools
Fetch API wrapped as a component with support for retries & timeouts
Fetch API wrapped as a component with support for retries & timeouts
This project uses node and npm.
$ npm install react-native-fetch
$ # OR
$ yarn add react-native-fetch
import Fetch from 'react-native-fetch'
export default class Home extends Component {
render () {
return (
<View style={styles.container}>
<Fetch
url="https://jsonplaceholder.typicode.com/posts/1"
retries={3}
timeout={3000}
onResponse={async (res) => {
const json = await res.json()
console.log(json)
}}
onError={console.error}
/>
</View>
)
}
}
url
(String) - The request url. Required.onResponse
(Function) - Fired when response is received.onError
(Function) - Fired when error occurs during request.method
(String) - HTTP request method. Default: 'GET'body
(String, body types) - HTTP request body.headers
(Object, Headers)- HTTP request headers to send. Default: {}See tenacious-fetch for more information about supported props.
MIT
FAQs
Fetch API wrapped as a component with support for retries & timeouts
The npm package react-native-fetch receives a total of 26 weekly downloads. As such, react-native-fetch popularity was classified as not popular.
We found that react-native-fetch 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.