native-data-fetching

Implement network requests and data fetching in Expo applications.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/xurenlu/marstaff --skill native-data-fetching-xurenlu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/xurenlu/marstaff/tree/main/skills/expo-native-data-fetching
Command: npx skills add https://github.com/xurenlu/marstaff --skill native-data-fetching-xurenlu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of fetching, managing, and debugging data in Expo applications, ensuring robust network requests and efficient data handling.

Core Features & Use Cases

  • API Integration: Implement and debug any network request or API call.
  • Data Management: Utilize libraries like React Query and SWR for caching, state management, and offline support.
  • Expo Router Integration: Leverage route-level data loaders for seamless data fetching in web applications.
  • Use Case: When building a new feature that requires fetching user profile data from an API, use this Skill to set up the fetch request, implement error handling, and integrate it with React Query for caching and optimistic updates.

Quick Start

Use the native-data-fetching skill to implement a basic GET request to 'https://api.example.com/users/123'.

Frequently Asked Questions about native-data-fetching

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

FAQPage Schema
How do I fetch data from an API in an Expo application?

Fetching data in an Expo application involves using the `expo/fetch` API over axios to execute network requests, handle errors, and manage API calls efficiently within your React Native components.

What's the best way to manage API caching and offline support in React Native?

The best way to manage API caching and offline support in React Native is by integrating data libraries like React Query or SWR. This Skill provides guidance on setting up these libraries for state management and offline capabilities.

Does Expo Router support route-level data loaders for web applications?

Yes, Expo Router supports route-level data loaders for web applications. You can leverage these loaders within your Expo app to achieve seamless data fetching directly at the route level.

Can I use axios for network requests in Expo, or should I use something else?

You can use axios, but this Skill strongly emphasizes using `expo/fetch` over axios for network requests in Expo. This approach ensures better integration with the Expo ecosystem for handling API calls.

How do I handle request cancellation and authentication in Expo data fetching?

Handling request cancellation and authentication in Expo data fetching involves utilizing built-in mechanisms for aborting requests and carefully managing environment variables and auth tokens within your fetch logic.