fec-data-fetching

Manage server-state fetching, caching, and invalidation across frontend frameworks.

21|3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/bovinphang/frontend-craft --skill fec-data-fetching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fec-data-fetching
Source: https://github.com/bovinphang/frontend-craft/tree/main/localized/zh-CN/skills/fec-data-fetching
Command: npx skills add https://github.com/bovinphang/frontend-craft --skill fec-data-fetching

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill defines a structured approach for server-state data fetching, caching, invalidation, and mutation flows to keep UI and API layers in sync, with a focus on type-safe boundaries in frontend apps.

Core Features & Use Cases

  • Establishes a clear boundary between server-state data and local UI state to prevent ad-hoc data management in components.
  • Provides guidelines for cache keys, mutation invalidation, optimistic updates with rollback, and SSR hydration.
  • Suitable for teams using TanStack Query or equivalent data fetching layers across React, Vue, Solid, and SSG workflows.

Quick Start

Adopt a typed server-state workflow to fetch, cache, and invalidate data across UI layers.

Frequently Asked Questions about fec-data-fetching

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

FAQPage Schema
How do I standardize server-state data fetching and caching across multiple frontend frameworks?

Standardize server-state data fetching by establishing a clear boundary between server and UI state, applying stable cache keys, mutation invalidation, and consistent data flows across React, Vue, Solid, and Svelte.

What's the best way to handle optimistic updates with rollback during data mutations?

Handle optimistic updates with rollback by defining structured mutation flows that enforce clear API boundaries, apply updates immediately, and automatically revert the local cache state when mutation errors occur.

How does server-state caching work with SSR hydration workflows?

Server-state caching for SSR workflows works by managing reliable hydration through structured cache keys and invalidation rules that synchronize server-fetched data with the client UI layer to prevent hydration mismatches.

Do I need TanStack Query to use this server-state invalidation pattern?

TanStack Query is not required but is the primary target. The pattern provides guidelines for cache keys, mutation invalidation, and prefetching suitable for TanStack Query or equivalent data fetching layers.

Why does my UI state get out of sync with server-state after mutations?

UI state gets out of sync when components manage data ad-hoc. Enforcing a clear boundary between server-state and local UI state with proper mutation invalidation keeps the UI and API layers synchronized.

Can I apply these data-fetching and invalidation patterns across React, Vue, Solid, and Svelte?

Yes, you can apply these data-fetching patterns across React, Vue, Solid, and Svelte. The approach enforces stable cache keys, clear API boundaries, and reliable SSR hydration for consistent workflows.