native-data-fetching

Implement and debug network requests with fetch, axios, React Query, and SWR.

Updated Jan 2, 2026
One-click install
npx skills add https://github.com/baskarajati/undangan --skill native-data-fetching-baskarajati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/baskarajati/undangan/tree/main/.agent/skills/native-data-fetching
Command: npx skills add https://github.com/baskarajati/undangan --skill native-data-fetching-baskarajati

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers implement, debug, and optimize network requests, API calls, and data fetching across web and mobile apps, covering fetch, axios, React Query, SWR, and offline scenarios.

Core Features & Use Cases

  • Robust request setup with fetch, axios alternatives, and client abstraction
  • Error handling, retries, and caching strategies for resilient apps
  • Offline support and data synchronization across environments

Quick Start

Create a unified API client that handles GET/POST requests with error handling, token management, and retry logic.

Frequently Asked Questions about native-data-fetching

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

FAQPage Schema
How do I set up a unified API client with error handling and retry logic?

A unified API client centralizes network requests using fetch or axios, wrapping GET/POST methods with token management, error handling, and backoff retry strategies to ensure resilient data fetching across web and mobile environments.

What's the best way to handle offline support and data synchronization?

Offline support and data synchronization are handled by integrating caching strategies that store network responses locally, allowing applications to queue and sync requests automatically once connectivity is restored.

How does caching work with React Query and SWR for data fetching?

Caching with React Query and SWR intercepts network requests to store and serve previously fetched data, reducing redundant API calls and enabling instant UI updates while background data revalidation occurs.

Do I need axios if I am already using the fetch API for network requests?

You do not need axios if the fetch API meets your needs, but axios provides built-in request and response transformations, automatic JSON transformation, and simplified timeout handling that fetch requires manual abstraction to achieve.

Why are my network requests failing and how do I implement error handling?

Network requests fail due to connectivity issues, invalid tokens, or server errors, which you can manage by implementing structured error handling that catches failures, applies retry logic with exponential backoff, and manages token refresh.

Can I use this approach for both web and mobile environments?

Yes, the data fetching and error handling strategies apply across both web and mobile environments, providing consistent API client setup, offline support, and caching mechanisms regardless of the platform.