native-data-fetching

Implement centralized fetch wrappers with error handling for React Native and Expo apps.

9|7|Updated Oct 6, 2025
One-click install
npx skills add https://github.com/sofia-municipality/your-sofia-mobile --skill native-data-fetching-sofia-municipality
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/sofia-municipality/your-sofia-mobile/tree/main/.github/skills/native-data-fetching
Command: npx skills add https://github.com/sofia-municipality/your-sofia-mobile --skill native-data-fetching-sofia-municipality

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of implementing, debugging, and maintaining robust network requests in React Native and Expo apps, including API calls, data fetching, caching, offline support, and token-based authentication.

Core Features & Use Cases

  • Centralized fetch wrapper with consistent error handling and retry logic
  • Integration with data-fetching libraries (React Query, SWR) for caching and state management
  • Support for authentication token management, offline mode, and environment-based API URLs

Quick Start

Start by implementing a centralized fetch wrapper with robust error handling for all API calls in your Expo/React Native project.

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 network data fetching and API errors in React Native and Expo?

Network data fetching in React Native and Expo is handled by implementing a centralized fetch wrapper with consistent error handling and retry logic for all API calls. This approach ensures robust network requests by standardizing error management across your application.

What is the best way to manage API caching and offline support in Expo apps?

The best way to manage API caching and offline support in Expo apps is by integrating data-fetching libraries like React Query or SWR. These libraries provide built-in caching and state management capabilities, enabling robust offline mode functionality.

How do I manage authentication tokens for API requests in React Native?

Authentication tokens for API requests in React Native are managed via secure storage. The Skill prescribes a token management strategy that securely stores credentials and attaches them to outgoing network requests automatically.

Can I use React Query or SWR for data fetching in an Expo project?

Yes, you can use React Query or SWR for data fetching in an Expo project. The Skill explicitly supports integration with these data-fetching libraries to handle caching, state management, and offline support within your application.

How do I configure environment-based API URLs for React Native network calls?

Environment-based API URLs for React Native network calls are configured within the centralized fetch wrapper. This setup allows your application to dynamically target different API endpoints based on the current build environment.

Why do my Expo fetch calls fail when the device loses network connection?

Expo fetch calls fail without offline support because the native fetch implementation lacks built-in caching and retry patterns. Implementing a fetch-wrapping strategy with React Query or SWR provides the necessary caching to handle intermittent network losses.