Registry / networking / react-native-nitro-fetch

react-native-nitro-fetch

JSON →
library1.3.3jsnpmunverified

A high-performance fetch implementation for React Native using Nitro Modules, providing native-level networking capabilities with support for streaming, cancellation, and progress events. Version 1.3.3 is current as of late 2025. It is actively maintained by the Margelo team, with a release cadence of approximately every 2-3 months. Key differentiators include direct integration with Nitro Modules for synchronous native calls, worklets for background processing, and full TypeScript support.

npm install react-native-nitro-fetch
INSTALL
IMPORT
SIG · REACT-NATIVE-NITRO
R
react-native-nitro-fetch
networkingjavascriptv1.3.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NitroFetch
✓ import { NitroFetch } from 'react-native-nitro-fetch'
✗ const NitroFetch = require('react-native-nitro-fetch')
ESM-only; CJS require may work but is not officially supported.
NitroFetchResponse
✓ import { NitroFetchResponse } from 'react-native-nitro-fetch'
TypeScript type import for response objects.
NitroFetchRequest
✓ import { NitroFetchRequest } from 'react-native-nitro-fetch'
Type for request configuration objects.

Shows basic usage of NitroFetch to make a GET request with authorization header, timeout, and error handling.

import { NitroFetch } from 'react-native-nitro-fetch'; const fetcher = new NitroFetch(); async function fetchData() { try { const response = await fetcher.request('https://api.example.com/data', { method: 'GET', headers: { 'Authorization': `Bearer ${process.env.API_KEY ?? ''}` }, timeoutMs: 5000, }); console.log('Status:', response.status); console.log('Data:', await response.text()); } catch (error) { console.error('Fetch error:', error); } } fetchData();
Debug
Known issues
breakingMinimum Nitro Modules version 0.35.2 required; older versions will cause runtime errors.
fix
Update react-native-nitro-modules to >=0.35.2.
affects: <1.3.0
breakingWorklets peer dependency must be >=0.8.0; otherwise background operations fail.
fix
Update react-native-worklets to >=0.8.0.
affects: <1.3.0
deprecatedThe static method NitroFetch.get() is deprecated in favor of instance method request().
fix
Replace NitroFetch.get(...) with new NitroFetch().request(...).
affects: >=1.2.0 <1.3.0
gotchaCancellation via AbortController is not supported; use timeoutMs option instead.
fix
Set timeoutMs in the request options to abort after a period.
affects: >=1.0.0
Errors
Common errors & fixes
Invariant Violation: TurboModuleRegistry: 'NitroFetch' is not available
Nitro Modules not properly linked or version mismatch.
fix
Ensure react-native-nitro-modules is correctly installed and linked. Run npx pod-install on iOS.
TypeError: (0, _reactNativeNitroFetch.NitroFetch) is not a constructor
Used default import instead of named import.
fix
Use import { NitroFetch } from 'react-native-nitro-fetch'.
Error: Worklets module not found. Make sure react-native-worklets is installed.
Missing worklets peer dependency.
fix
Install react-native-worklets: npm install react-native-worklets
Type 'NitroFetchResponse' is not assignable to type 'any'.
Missing TypeScript import for response type.
fix
Import NitroFetchResponse explicitly: import { NitroFetchResponse } from 'react-native-nitro-fetch'.
Upgrade
Version history
1.3.3latest on npm
Audit
Dependencies
react-native-nitro-modulesrequiredProvides the underlying Nitro module infrastructure for synchronous native calls.
react-native-workletsrequiredEnables running fetch operations on a background thread without blocking the UI.
react-nativerequiredRequired peer dependency for React Native projects.
reactrequiredRequired peer dependency for React.
Agent activity
12 hits · last 30 days
node
10
Amazon
1
Resources
react-native-nitro-fetch — npm install react-native-nitro-fetch · libregistry