Component architecture
Defines component structure, prop typing, responsibility separation, and ref handling patterns. Use when creating or refactoring React components. Triggers on: component structure, FC, prop type, forwardRef, ref handling, split component, responsibility separation.From its SKILL.md
npx -y skills add hzblj/skills --skill component-architectureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
0.9 KB, as published. Nobody here has run it
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.