component-architecture
Installation
SKILL.md
Component Architecture
- Define components using
FCand explicit proptype. - Never use
interfacefor props. - No implicit inline returns.
- Always use braces and explicit
return. - Prefer multiple small components over one large component.
- Split by responsibility, not file size.
- Components should focus on rendering.
- Business logic should live in hooks.
- API transformation logic should not live inside render files.
Ref Handling
- Never pass
refvia regular props. - Always use
forwardRefwhen exposing refs. - Ref typing must be explicit.
- No optional ref hacks.