native-data-fetching

Guide Expo developers in managing network requests and data fetching with fetch API, React Query, SWR, and Expo Router.

3|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/jonluca/palate --skill native-data-fetching-jonluca
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/jonluca/palate/tree/main/.agents/skills/native-data-fetching
Command: npx skills add https://github.com/jonluca/palate --skill native-data-fetching-jonluca

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires expo, react-query, swr, expo-router, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill Unit addresses the complexities of networking and data fetching in Expo applications, making it easier to manage API calls, data loading, and error handling.

Core Features & Use Cases

  • Expo Networking Best Practices: Implements the recommended approach for making API requests, fetching data, and caching.
  • React Query and SWR Integration: Offers guidelines on setting up data fetching with React Query and SWR for different use cases.
  • Expo Router Data Loaders: Provides instructions for using Expo Router data loaders for server-side rendering and static generation.
  • Error Handling and Caching: Covers strategies for handling errors, implementing caching, and managing offline support.
  • Authentication and Token Management: Offers best practices for managing authentication tokens and implementing secure network requests.
  • Environment Variables and Configuration: Explains how to use environment variables for API configuration and managing different environments.
  • TypeScript Support: Ensures TypeScript support for type safety in API client configurations.

Quick Start

Run 'pnpm install' to install dependencies, then execute 'pnpm ios' to build and run your iOS app.

Frequently Asked Questions about native-data-fetching

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

FAQPage Schema
What is the best way to handle data fetching in Expo applications?

React Query and SWR are both supported for data fetching in Expo. React Query offers robust caching and synchronization features, while SWR provides a lighter footprint for real-time API interactions depending on your state needs.

How do I use Expo Router data loaders for network requests?

Expo Router data loaders support server-side rendering and static generation by fetching data before navigation. This approach preloads API responses, ensuring seamless data synchronization and immediate UI rendering.

Can I manage authentication tokens and environment variables with this data fetching setup?

Yes, you can manage authentication tokens and environment variables. The setup provides best practices for secure network requests and API configuration, using environment variables to manage different environments safely.

How do I handle errors and offline support when fetching data in Expo?

Handle errors and offline support in Expo by implementing dedicated caching strategies and error handling guidelines. These mechanisms manage API failures and maintain data availability during network interruptions.

Does this Expo networking approach support TypeScript for API client configurations?

Yes, the Expo networking approach fully supports TypeScript for API client configurations. It ensures type safety across API calls, preventing type-related errors during data fetching and environment configuration.