native-data-fetching

Automate network requests with error handling, retries, and offline support.

2|Updated Feb 27, 2020
One-click install
npx skills add https://github.com/nickcorin/dotfiles --skill native-data-fetching-nickcorin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/nickcorin/dotfiles/tree/main/dot_config/opencode/skill/native-data-fetching
Command: npx skills add https://github.com/nickcorin/dotfiles --skill native-data-fetching-nickcorin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers implement and debug reliable network requests across fetch API, axios, React Query, SWR, and related patterns, addressing error handling, caching, and offline scenarios.

Core Features & Use Cases

  • Unified approach to fetch, error handling, and caching for API calls across web and mobile apps.
  • Guidance for React Query, SWR, offline support, authentication, environment variables, and retry strategies.
  • Real-world use case: debugging flaky APIs with proper error handling, retries, and token management.

Quick Start

Describe your network workflow and I will configure a robust fetch wrapper with error handling, caching, and offline support.

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 API errors and retries with React Query in Expo?

API errors and retries in Expo are handled by configuring a fetch wrapper with deterministic flows and exponential backoff. This ensures robust network requests and proper error handling across React Native and Expo projects.

What is the best way to implement offline-first syncing in React Native?

Offline-first syncing caches network requests and synchronizes data when connectivity restores. This mechanism manages token authentication with secure storage and environment-driven API configuration to maintain data consistency across React Native apps.

How do I manage authentication tokens with secure storage during network requests?

Authentication token management integrates secure storage with your fetch API calls. This ensures tokens are safely persisted and automatically applied during API requests, maintaining secure sessions across web and mobile environments.

Can I use SWR for data fetching with environment-driven API configuration?

SWR supports data fetching with environment-driven API configuration by unifying caching and error handling. This approach applies environment variables to manage network requests consistently across web and mobile applications.

Why does my fetch API wrapper fail to handle flaky network connections?

Flaky network connections fail without proper retry strategies and offline caching. Implementing a fetch wrapper with exponential backoff, offline support, and error handling ensures reliable API calls during intermittent connectivity.