File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Pages Router Data Fetching
77
77
- Use getServerSideProps for server-side rendering on each request
78
78
- Use getStaticPaths with getStaticProps for dynamic static generation
79
79
- Implement ISR (Incremental Static Regeneration) with revalidate option
80
- - Use SWR or React Query for client-side data fetching
80
+ - Use SWR for client-side data fetching
81
81
- Cache API responses appropriately based on data volatility
82
82
83
83
Data Fetching Best Practices
@@ -138,7 +138,7 @@ API Route Structure
138
138
- Organize API routes in app/api directory matching your URL structure
139
139
- Use HTTP methods correctly (GET for reading, POST for creating, etc.)
140
140
- Implement proper error handling with appropriate HTTP status codes
141
- - Validate request data using libraries like Zod or Joi
141
+ - Validate request data using libraries like Zod
142
142
- Use middleware for authentication and request validation
143
143
- Document API endpoints with TypeScript interfaces
144
144
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Local State
42
42
43
43
Global State
44
44
- Use Context API for theme/authentication
45
- - Use Redux Toolkit for complex state
45
+ - Consider state management solutions for complex state
46
46
- Implement proper state selectors
47
47
- Use proper state normalization
48
48
- Implement proper state persistence
You can’t perform that action at this time.
0 commit comments