react-composition-patterns
Installation
SKILL.md
React Composition Patterns
Purpose
Use composition to repair demonstrated component API pressure, not to create architecture preemptively.
This skill is intentionally narrow. General React implementation belongs to the normal frontend workflow; performance belongs to performance-optimization.
Trigger gate
Use this skill when at least one is true:
- a component has accumulated several interacting boolean mode props;
- multiple consumers need different combinations of the same internals;
- a reusable library/component API needs a stable extension seam;
- siblings need coordinated state/actions from one owner;
- a compound-component API clearly improves the caller experience.
If the component has one or two straightforward use cases, keep the direct implementation.