rename folder

This commit is contained in:
sanjeed5
2025-02-27 00:04:07 +05:30
parent 519c3fa882
commit f7fa52c998
879 changed files with 0 additions and 0 deletions
@@ -0,0 +1,5 @@
---
description: This rule enforces the use of functional components with hooks in React components within the src/components directory.
globs: src/components/**/*.tsx
---
- Always use functional components with hooks instead of class components.
@@ -0,0 +1,13 @@
---
description: This rule enforces the defined folder structure for a React project, improving organization and maintainability.
globs: src/**/*
---
- Enforce the following folder structure:
- src/
- components/
- hooks/
- useQueries/
- useMutations/
- pages/
- utils/
- api/
@@ -0,0 +1,11 @@
---
description: This rule lists additional instructions for using React Query, including TypeScript usage, error handling, and debugging tools.
globs: src/**/*.tsx
---
- Use TypeScript for type safety with React Query
- Implement proper error boundaries for query errors
- Utilize React Query DevTools for debugging
- Use stale-while-revalidate strategy for data freshness
- Implement optimistic updates for mutations
- Use query invalidation for data refetching
- Follow React Query naming conventions for consistency
@@ -0,0 +1,9 @@
---
description: This rule outlines the general best practices for using React Query throughout the React project.
globs: src/**/*.tsx
---
- 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
@@ -0,0 +1,6 @@
---
description: This rule specifies the folder structure and purpose for placing React Query custom hooks in dedicated subdirectories.
globs: src/hooks/**/*.ts
---
- Place query hooks in src/hooks/useQueries/
- Place mutation hooks in src/hooks/useMutations/