Component Composition Analyzer
When to Trigger
- •Creating complex components
- •Component has >10 props
- •Component >200 lines
What to Do
- •Identify: Sections that can be separate components (form sections, lists, modals, toolbars).
- •Split: Extract into named components with clear props; keep parent as orchestrator with minimal state.
- •Props: Prefer few, focused props; use composition (children, render props) instead of many optional flags.
- •Benefits: Smaller files, single responsibility, easier testing, better memoization.
Suggest concrete component names and prop interfaces. Keep each new component under ~50–100 lines where possible.