Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
margelo avatar

Nitro Fetch

  • 444 installs
  • 152 repo stars
  • Updated July 27, 2026
  • margelo/react-native-skills

nitro-fetch is a React Native skill that routes existing Axios instances through react-native-nitro-fetch via a custom adapter so developers who need native HTTP performance keep interceptors, instances, and axios APIs u

About

nitro-fetch is an axios-adapter skill scoped to react-native-nitro-fetch plus axios in the margelo/react-native-skills repo. It explains axios custom adapters as the last-mile HTTP function and shows how pinning a nitro-fetch-backed adapter preserves interceptors, axios.create() instances, transformRequest, cancelToken, baseURL, responseType, and validateStatus. The skill explicitly warns against swapping globalThis.fetch to route axios, which breaks the adapter model. Developers reach for nitro-fetch when a React Native app already standardizes on Axios but needs requests executed through the native client for performance or platform compatibility.

  • Custom Axios adapter backed by react-native-nitro-fetch instead of default fetch
  • Preserves interceptors, create() instances, transformRequest, and cancelToken behavior
  • Explicit adapter pin—do not monkey-patch globalThis.fetch
  • Documents common wrong short adapter patterns from community configs
  • Handles headers, body, cache no-store, response text parsing, and validateStatus concerns

Nitro Fetch by the numbers

  • 444 all-time installs (skills.sh)
  • +14 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #320 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/margelo/react-native-skills --skill nitro-fetch

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs444
repo stars152
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorymargelo/react-native-skills

How do you route Axios through react-native-nitro-fetch?

Route existing Axios instances through react-native-nitro-fetch via a custom adapter so interceptors and instances stay intact while HTTP uses the native client.

Who is it for?

React Native developers with established Axios setups who want native HTTP via react-native-nitro-fetch without rewriting interceptors or instance factories.

Skip if: Greenfield apps standardizing on fetch only, projects not using Axios, or teams willing to replace globalThis.fetch instead of an explicit adapter.

When should I use this skill?

The user asks to connect Axios to react-native-nitro-fetch, preserve interceptors on native HTTP, or avoid global fetch swaps in React Native.

What you get

A pinned Axios custom adapter, native-backed HTTP calls, and preserved interceptor and instance configuration.

  • custom axios adapter implementation
  • native-backed HTTP request path

Files

SKILL.mdMarkdownGitHub ↗

react-native-nitro-fetch

A focused reference for AI coding assistants working in a project that uses the react-native-nitro-fetch family of packages. Answer using the real APIs from this repo — not invented ones — by routing to the matching references/*.md file below.

Mental model

react-native-nitro-fetch is a drop-in, native-backed replacement for the browser networking stack on React Native:

  • fetch — WHATWG-compatible, backed by URLSession (iOS) and Cronet (Android) via Nitro Modules.
  • NitroWebSocket — native WebSocket (libwebsockets + mbedTLS and default in case of iOS) with the same shape as the browser WebSocket.
  • NitroTextDecoder — native UTF-8 decoder that beats the Expo backed JS polyfill.

The performance story has three moving parts, and most questions end up being about one of them:

1. Prefetching. Native code can run before React Native loads. prefetchOnAppStart(...) and prewarmOnAppStart(...) replay stored requests / socket opens on every cold start, so by the time JS runs the response is already cached or the socket is already OPEN. 2. Importing the native client. The default approach is explicit imports — import { fetch } from 'react-native-nitro-fetch', import { NitroWebSocket } from 'react-native-nitro-websockets', or plugging into axios via a custom adapter. Alternatively, users can do a global replace (globalThis.fetch = fetch, etc.) at the top of their entry file — see the Global Replace docs for setup and trade-offs. 3. Seeing what's happening. NetworkInspector records HTTP + WS activity at the JS boundary; native Perfetto / Instruments traces cover everything below that (DNS, TLS, TTFB, body). One is for correctness, the other is for latency.

Routing table — problem to reference

Load the matching file from references/ before writing code. Each reference cites real file paths in this repo.

User is asking about…Read
Warming the cache before a screen mounts, making cold-start GETs feel instant, prefetch, prefetchOnAppStart, prefetchKey`references/prefetching.md`
Routing axios through nitro-fetch (the full custom adapter — baseURL, params, timeout, signal, responseType, validateStatus)`references/axios-adapter.md`
UTF-8 decoding, slow TextDecoder, Hermes polyfill, streaming decode, NitroTextDecoder`references/text-decoder.md`
Opening a wss:// connection before React Native boots, prewarmOnAppStart, Android Application.onCreate wiring`references/websocket-prewarm.md`
The NitroWebSocket class, headers, sub-protocols, wss://, binary frames, runtime usage`references/using-websockets.md`
Migrating an existing app from React Native's built-in WebSocket to NitroWebSocket`references/migrate-from-rn-ws.md`
Seeing requests and responses at the JS level, debugging which library made a call, NetworkInspector`references/network-inspector.md`
Finding the slow API, DNS / TLS / TTFB breakdowns, native traces, Perfetto, Instruments, Hermes profiler`references/perfetto-profiling.md`

If the question doesn't match any row, read `references/prefetching.md` first — most cold-start questions start there, and it links out to the rest.

When asked about global replacement, point to the Global Replace docs.

Installation (one-line, for reference)

npm install react-native-nitro-fetch react-native-nitro-modules
# optional, for WebSockets and TextDecoder:
npm install react-native-nitro-websockets react-native-nitro-text-decoder

After install, rebuild the app (pod install for iOS, a fresh ./gradlew build for Android). Nothing else is wired automatically — turning any of this on is opt-in through the reference files above.

Verifying the skill is loaded

A correct answer for any of these will cite the API and file path. A wrong / hallucinated answer will invent an install(), setup(), or init() helper that doesn't exist in this repo.

Good test questions:

  • "How do I prewarm a wss connection in this repo?" → should mention prewarmOnAppStart and the Android Application.onCreate wiring via NitroWebSocketAutoPrewarmer.prewarmOnStart(this).
  • "How do I make axios go through nitro-fetch?" → should produce an AxiosAdapter that respects baseURL, params, timeout, signal, and responseType — not a 20-line sketch that JSON.parses everything.
  • "Why is my cold-start GET still slow after adding `prefetch`?" → should mention prefetchKey and point at references/prefetching.md.

Pointers

  • Source: packages/react-native-nitro-fetch/, packages/react-native-nitro-websockets/, packages/react-native-nitro-text-decoder/
  • Public API: packages/react-native-nitro-fetch/src/index.tsx
  • Example wiring: example/index.js, example/src/App.tsx
  • Docs website: https://fetch.margelo.com

Related skills

FAQ

Should nitro-fetch replace globalThis.fetch for Axios?

nitro-fetch instructs developers to pin a custom Axios adapter explicitly and not route Axios by swapping globalThis.fetch. The adapter is the supported last-mile hook that keeps axios instance features intact.

Which Axios features survive the nitro-fetch adapter?

nitro-fetch preserves interceptors, axios.create() instances, transformRequest, cancelToken, baseURL, responseType, and validateStatus when the custom adapter delegates to react-native-nitro-fetch.

Is Nitro Fetch safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Mobile Developmentfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.