components-composition-patterns
Skill0 starsChanged 4 months agoMITView on GitHub
React composition patterns that scale — compound components, render props, context providers, lifting state. Use when refactoring boolean-prop-heavy components or designing flexible, reusable component APIs (incl. React 19)
In this repository63 other files it gives its agents.
- .claude/skills/nestjs-best-practices/AGENTS.mdAGENTS.md
- accessibility-a11ySkill
- architecture-blueprint-generatorSkill
- backend-delivery-loopSkill
- backend-designSkill
- backend-dev-guidelinesSkill
- backend-testingSkill
- backend-to-frontend-handoff-docsSkill
- building-componentsSkill
- bullmq-specialistSkill
- canvas-designSkill
- code-patternsSkill
- conventional-commitSkill
- core-web-vitalsSkill
- create-svgSkill
- css-architectureSkill
- cypress-authorSkill
- cypress-docsSkill
- cypress-explainSkill
- delivery-loop-retroSkill
- diagnoseSkill
- fastify-best-practicesSkill
- figma-code-connectSkill
- frontend-delivery-loopSkill
- frontend-fundamentalsSkill
- fullstack-delivery-loopSkill
- grill-meSkill
- hunt-race-conditionSkill
- impeccableSkill
- mermaid-diagramsSkill
- nestjs-best-practicesSkill
- nextjs-best-practicesSkill
- nextjs-performanceSkill
- nodejs-backend-patternsSkill
- owasp-security-reviewSkill
- performance-hunterSkill
- playwright-best-practicesSkill
- postgresql-code-reviewSkill
- postgresql-optimizationSkill
- postmanSkill
- prisma-postgresSkill
- pro-state-machineSkill
- race-conditionSkill
- react-best-practicesSkill
- react-performanceSkill
- react-querySkill
- redis-coreSkill
- redis-query-engineSkill
- redis-securitySkill
- refactorSkill
- review-panelSkill
- run-delivery-chainSkill
- spec-drivenSkill
- sql-optimizationSkill
- system-designSkill
- testing-strategySkill
- tune-skills-and-agentsSkill
- ui-ux-pro-maxSkill
- vercel-react-view-transitionsSkill
- viteSkill
- The first 60 shown.
The file
Files
React Composition Patterns
Composition patterns for building flexible, maintainable React components. Avoid boolean prop proliferation by using compound components, lifting state, and composing internals. These patterns make codebases easier for both humans and AI agents to work with as they scale.
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Reference |
| 1 | Component Architecture | HIGH | architecture- | references/component-architecture.md |
| 2 | State Management | MEDIUM | state- | references/state-management.md |
| 3 | Implementation Patterns | MEDIUM | patterns- | references/implementation-patterns.md |
| 4 | React 19 APIs | MEDIUM | react19- | references/react19-apis.md |
References
Each file is loaded on demand — read one only when the task needs that depth (progressive disclosure).
references/component-architecture.md— avoiding boolean-prop proliferation and structuring compound components with shared context · read when a component has accumulated boolean modes or you're designing a flexible multi-part component API.references/state-management.md— lifting state into providers, generic context interfaces for dependency injection, decoupling state from UI · read when sibling components need shared state, or you want the same UI to work across different state implementations.references/implementation-patterns.md— explicit variant components over boolean modes, and children over render props · read when choosing between variant components vs. props, or betweenchildrenandrenderXcallbacks.references/react19-apis.md—refas a regular prop (noforwardRef) anduse()instead ofuseContext()· read when targeting React 19+ and refactoring refs or context usage.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

