react-best-practices
Installation
SKILL.md
React & Next.js Best Practices
Goal: Build high-performance, maintainable, and accessible React applications using modern patterns (React 19+, Next.js App Router).
1. Architecture & Rendering
- App Router First: Use Next.js App Router (
app/) for all new projects. - Server Components (RSC): Default to Server Components. Only add
'use client'when interactivity (state, hooks, event listeners) is strictly needed. - Suspense & Streaming: Use
<Suspense>boundaries to stream UI parts that depend on slow data. - Data Fetching: Fetch data in Server Components directly (async/await components). Avoid
useEffectfor data fetching.
2. Component Patterns
- Composition: Use
childrenprop to tackle prop drilling. - Atomic Design: Organize components by atomicity (though feature-based folder structure is preferred for scale).
- Custom Hooks: Extract complex logic into
useHookName. - Props: Use strict TypeScript interfaces for props. Avoid
any.
3. State Management
Related skills
More from dokhacgiakhoa/antigravity-ide
ui-ux-pro-max-skill
Premium design and micro-interactions toolkit.
89notion-mcp
Official Notion Model Context Protocol Server for workspace interaction.
33filesystem-mcp
Official Filesystem Model Context Protocol Server for local file operations.
24puppeteer-mcp
Official Puppeteer Model Context Protocol Server for browser automation.
15penetration-tester-master
Ultimate Offensive Security Master Skill.
14postgres-mcp
Official PostgreSQL Model Context Protocol Server for database interaction.
14