react-query

Solid

TanStack Query (React Query) patterns for server state management, caching, mutations, optimistic updates, and infinite queries.

AI & Automation 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# React Query Skill Expert assistance for implementing TanStack Query (React Query) for server state management in React applications. ## Capabilities - Configure QueryClient with optimal defaults - Implement queries with caching strategies - Handle mutations with optimistic updates - Set up infinite queries for pagination - Manage query invalidation and prefetching - Integrate with authentication and error handling ## Usage Invoke this skill when you need to: - Fetch and cache server data - Handle mutations with rollback - Implement infinite scroll or pagination - Prefetch data for navigation - Synchronize server state ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | endpoint | string | Yes | API endpoint to query | | queryKey | array | Yes | Unique query key | | staleTime | number | No | Time until data is stale (ms) | | cacheTime | number | No | Time to keep in cache (ms) | | optimisticUpdate | boolean | No | Enable optimistic updates | ### Configuration Example ```json { "endpoint": "/api/users", "queryKey": ["users"], "staleTime": 300000, "cacheTime": 600000, "optimisticUpdate": true } ``` ## Generated Patterns ### Query Client Setup ```typescript import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime: 1000 * 60 * 5, // ...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

tanstack-query-expert

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

39,350 Updated today
sickn33
Web & Frontend Featured

tanstack-query-expert

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

27,705 Updated today
davila7
AI & Automation Listed

tanstack-query-best-practices

TanStack Query (React Query) best practices for data fetching, caching, mutations, and server state management. Activate when building data-driven React applications with server state.

11 Updated today
wordbricks
AI & Automation Listed

tanstack-query-patterns

Auto-enforce TanStack Query best practices with factory key pattern. Activates when creating queries, mutations, managing server state, or implementing data fetching in React applications.

3 Updated 1 weeks ago
smicolon
Data & Documents Listed

tanstack

Build type-safe React apps with TanStack Query (data fetching, caching, mutations), Router (file-based routing, search params, loaders), and Start (SSR, server functions, middleware). Use when working with react-query, data fetching, server state, routing, search params, loaders, SSR, server functions, or full-stack React. Triggers on tanstack, react query, query client, useQuery, useMutation, invalidateQueries, tanstack router, file-based routing, search params, route loader, tanstack start, createServerFn, server functions, SSR.

29 Updated 6 days ago
tenequm