fetching-data-correctly
CommunityFetch data reliably in React/Next.js
Software Engineering#react#data fetching#next.js#race condition#tanstack query#useEffect#optimistic updates
Authoralexejluft
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents common and frustrating issues like race conditions, stale data, memory leaks, and broken optimistic updates when fetching data in React or Next.js applications.
Core Features & Use Cases
- Prioritizes Modern Fetching: Recommends Server Components in Next.js or TanStack Query in React SPAs over raw
useEffectfetches. - Race Condition Prevention: Provides patterns to abort previous requests when new ones are initiated.
- Optimistic Update Handling: Details the correct pattern for optimistic updates, including rollback mechanisms.
- Use Case: Ensure your user sees immediate UI feedback after creating a new item, with a robust fallback if the server operation fails.
Quick Start
Use the fetching-data-correctly skill to fetch data for a product with ID 123 using TanStack Query.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: fetching-data-correctly Download link: https://github.com/alexejluft/brudi/archive/main.zip#fetching-data-correctly Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.