-
Notifications
You must be signed in to change notification settings - Fork 205
/
.cursorrules
34 lines (30 loc) · 999 Bytes
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// React + MobX .cursorrules
// Prefer functional components with hooks
const preferFunctionalComponents = true;
// MobX best practices
const mobxBestPractices = [
"Use MobX-react-lite for optimal performance with functional components",
"Implement stores for managing application state",
"Utilize computed values for derived state",
"Use actions for modifying observable state",
"Implement proper error handling in asynchronous actions",
];
// Folder structure
const folderStructure = `
src/
components/
stores/
hooks/
pages/
utils/
`;
// Additional instructions
const additionalInstructions = `
1. Use TypeScript for type safety with MobX
2. Implement strict mode for MobX for better debugging
3. Use observer HOC or useObserver hook for reactive components
4. Implement proper dependency injection for stores
5. Use reaction for side-effects based on observable changes
6. Utilize MobX DevTools for debugging
7. Follow MobX best practices for scalable state management
`;