AI SummaryHeuristic scoring (no AI key configured).
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "my-react-vite-app — Cursor Rules" prompt rules to my project. Repository: https://github.com/Feyded/my-react-vite-app Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Cursor Rules for my-react-vite-app
Purpose and Overview
Mutation hooks abstract data modification operations (create, update, delete) using TanStack Query's useMutation hook. They provide loading states, error handling, and optimistic updates. These hooks connect UI components to the data access layer for write operations, keeping components focused on presentation rather than data manipulation logic.
Mutation Hooks Module Structure
` src/ ├── hooks/ # Shared hooks module │ └── query/ # Shared query hooks (includes mutations) │ └── [entity] │ ├── use-create-[entity]-mutation.ts # Create operation │ ├── use-update-[entity]-mutation.ts # Update operation │ └── use-delete-[entity]-mutation.ts # Delete operation └── features/ └── [feature-name]/ └── _hooks/ # Feature-specific hooks └── query/ # Feature-specific query hooks (includes mutations) └── [entity] ├── use-create-[entity]-mutation.ts ├── use-update-[entity]-mutation.ts └── use-delete-[entity]-mutation.ts `
Files
• use-create-[entity]-mutation.ts: For create operations • use-update-[entity]-mutation.ts: For update operations • use-delete-[entity]-mutation.ts: For delete operations
Functions
• useCreate[Entity]Mutation: For create operations • useUpdate[Entity]Mutation: For update operations • useDelete[Entity]Mutation: For delete operations
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts