Best practices for composing React components for maximum reusability
.cursorrules in your project rootApply these composition patterns: 1. Use children prop for flexible layouts 2. Implement render props for shared behavior 3. Create compound components for related UI 4. Use the slot pattern for customizable sections 5. Prefer composition over configuration props 6. Keep components focused on single responsibility 7. Extract reusable logic into custom hooks
Comprehensive Cursor rules for Next.js 14+ with App Router, including routing, layouts, and API patterns.
Cursor rules for TypeScript with strict type checking, advanced patterns, and best practices.
Cursor rules for Tailwind CSS development with responsive design, custom components, and dark mode.
Cursor
frontend
AI coding rules customize how Cursor generates and refactors code for your project. Follow these steps to install React Component Composition.
.cursor/rules, for Windsurf use .windsurfrulesComprehensive Cursor rules for Next.js 14+ with App Router, including routing, layouts, and API patterns.
Cursor rules for TypeScript with strict type checking, advanced patterns, and best practices.
Cursor rules for Tailwind CSS development with responsive design, custom components, and dark mode.