react-best-practices
React Best Practices
Comprehensive performance optimization guide for React and Next.js applications, tuned by gracefullight (forked from Vercel Engineering). Contains 42 rules across 8 categories (some rules are enforced by Biome linter), prioritized by impact to guide automated refactoring and code generation.
Project-Specific Notes
This project uses Orval + React Query (@tanstack/react-query) for API layer:
- Orval generates type-safe React Query hooks from OpenAPI specs
- Always use Orval-generated hooks in Client Components instead of RSC data fetching
- React Query handles caching, deduplication, and devtools
- RSC Components should handle layout, SEO metadata, and pass static props only
React Compiler is enabled (reactCompiler: true in next.config.ts):
- React Compiler automatically handles memoization (useMemo, useCallback, React.memo)
- Only use manual memoization when profiling a bottleneck or for genuinely expensive computations
When to Apply
Reference these guidelines when:
More from first-fluke/fullstack-starter
fastapi-router-creator
Guide for creating and organizing FastAPI routes using a file-based routing system or modular router pattern. Helps organize complex API structures.
46component-refactoring
Refactor high-complexity React components. Use when complexity metrics are high or to split monolithic UI.
33ui-ux-pro-max
Advanced design intelligence for professional UI/UX. Use for implementing modern design patterns (Glassmorphism, Bento Grid), ensuring accessibility, and generating tailored design systems for web and mobile.
26frontend-code-review
Standardized checklist and process for reviewing frontend code (.tsx, .ts, .js).
23frontend-engineer
Develop production-grade frontend code using shadcn/ui, best practices, and strict design alignment.
17skill-lookup
Discover, retrieve, and learn about available Agent Skills. key capability for finding tools to solve specific problems.
16