native-data-fetching

Guide React Native developers in implementing and debugging data fetching with fetch, React Query, SWR, and Expo Router loaders.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/robinxin/AIFlomo --skill native-data-fetching-robinxin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/robinxin/AIFlomo/tree/main/.claude/skills/native-data-fetching
Command: npx skills add https://github.com/robinxin/AIFlomo --skill native-data-fetching-robinxin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill guides developers through implementing and debugging data fetching for native apps, covering the fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (useLoaderData).

Core Features & Use Cases

  • Unified data-fetching guidance for API calls, error handling, and offline support across web and native contexts.
  • Integrations with fetch, React Query, SWR, and Expo Router loaders to streamline data loading in React Native apps.
  • Real-world scenarios including authenticated requests, retry strategies, and caching to improve resilience and performance.

Quick Start

Run a simple data fetch with fetch and basic error handling to retrieve a user profile.

Frequently Asked Questions about native-data-fetching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle data fetching errors and retries in React Native?

Data fetching errors in React Native can be handled using the fetch API with custom retry strategies, or by configuring built-in retry mechanisms in SWR and React Query to improve app resilience.

What's the best way to implement offline data caching in React Native?

Offline data caching in React Native is best implemented using SWR or React Query, which provide built-in caching mechanisms to ensure data availability and reliable fetching when the network is unstable.

Does Expo Router support data loaders for fetching API data?

Yes, Expo Router supports data loaders through the useLoaderData hook, allowing developers to fetch API data directly and streamline data loading within native app architectures.

How do I manage authentication tokens when fetching data in React Native?

Authentication token management during data fetching in React Native involves integrating authenticated requests into your existing app architecture and configuring environment variables for secure token handling.

React Query vs SWR: which should I use for native app data fetching?

Both React Query and SWR offer robust data fetching for native apps. SWR provides lightweight caching, while React Query offers advanced features for retry strategies and complex state management.

Why does my fetch API call fail in a React Native offline environment?

Fetch API calls fail in offline React Native environments without proper caching and offline support. Implementing SWR or React Query provides the necessary caching layer to handle network interruptions gracefully.