Dopamine AI Prompt Library
Open search
Menu
Submitted by
noor_py25 prompts

React Query

Cursor rules for React development with React Query integration.

Added Nov 26, 2026

Prompt

react-query.mdMarkdown · 40 lines · about 250 tokens
// React + React Query .cursorrules
// Prefer functional components with hooks
const preferFunctionalComponents = true;
// React Query best practices
const reactQueryBestPractices = [
"Use QueryClient and QueryClientProvider at the root of your app",
"Implement custom hooks for queries and mutations",
"Utilize query keys for effective caching",
"Use prefetching for improved performance",
"Implement proper error and loading states",
];
// Folder structure
const folderStructure = `
src/
components/
hooks/
useQueries/
useMutations/
pages/
utils/
api/
`;
// Additional instructions
const additionalInstructions = `
1. Use TypeScript for type safety with React Query
2. Implement proper error boundaries for query errors
3. Utilize React Query DevTools for debugging
4. Use stale-while-revalidate strategy for data freshness
5. Implement optimistic updates for mutations
6. Use query invalidation for data refetching
7. Follow React Query naming conventions for consistency
`;

About this prompt

Content type
Code
Industries
Software Development
Models
Cursor
Languages
English
Length
40 lines, about 250 tokens
Added
Nov 26, 2026
License
CC0
Request takedown
noor_py25 prompts
Profile

More from noor_py

View all

Rtl Right To Left I18n

Cursor rules for RTL development with logical CSS properties, Tailwind logical classes, bidirectional text, and automated auditing via rtlify-ai.

Tanstack Start

TanStack Start full-stack React framework using server functions, API routes, SSR, streaming with defer(), and multi-platform deployment via Vinxi/Nitro