handling-data-sync
CommunityMaster TanStack Query mutations.
Software Engineering#cache invalidation#tanstack query#mutations#optimistic updates#react query#infinite scroll
Authoralexejluft
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses common pitfalls in TanStack Query mutations, preventing issues like API errors, incorrect list updates, infinite scroll bugs, and form submission double-clicks.
Core Features & Use Cases
- Optimistic Updates: Safely update the cache without breaking rollback mechanisms.
- Cache Invalidation: Implement targeted cache invalidation strategies instead of broad, inefficient refreshes.
- Infinite Scroll: Correctly signal the end of data to prevent infinite loops.
- Form Submissions: Utilize
useMutationfor robust form handling and automatic cache invalidation. - Use Case: When submitting a new item to a list, ensure the UI updates immediately and correctly, and that subsequent fetches reflect the new data without errors.
Quick Start
Use the handling-data-sync skill to implement optimistic updates for a todo item mutation.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 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: handling-data-sync Download link: https://github.com/alexejluft/brudi/archive/main.zip#handling-data-sync 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.