What problem does it solve?
This Skill addresses unreliable or inconsistent network implementations in Expo and React Native apps by providing clear patterns for making API requests, handling errors, managing authentication tokens, caching, and supporting offline scenarios so apps remain robust and debuggable.
Core Features & Use Cases
- Fetch-first guidance: prefer the built-in fetch API for deterministic requests and avoid unnecessary axios usage.
- Stateful caching and synchronization: ready patterns for React Query setup, queries, mutations, staleTime tuning, and invalidation flows.
- Resilient error handling and retries: typed API errors, retry with exponential backoff, and request cancellation strategies.
- Authentication and token lifecycle: secure token storage with expo-secure-store, token refresh coordination, and authenticated fetch wrappers.
- Offline support and environment config: network status detection with NetInfo, React Query onlineManager integration, and environment-specific API host configuration using EXPO_PUBLIC_ variables.
- Use Case: implement a production API client for an Expo app that needs authenticated requests, robust retry/backoff, and offline-aware caching.
Quick Start
Use the native-data-fetching skill to implement a fetch-based API client with error handling, retry logic, secure token storage, and React Query integration for your Expo app.