react-component-architecture
Installation
SKILL.md
React Component Architecture
Component Design Principles
- Single Responsibility - Each component does one thing well
- Composition Over Configuration - Use children and render props over prop drilling
- Colocation - Keep related code together (styles, tests, types)
- Controlled vs Uncontrolled - Be explicit about state ownership
Component Patterns
Compound Components
For complex UI with shared state:
const Tabs = ({ children, defaultValue }: TabsProps) => {
const [active, setActive] = useState(defaultValue);
return (
<TabsContext.Provider value={{ active, setActive }}>
Related skills
More from autohandai/community-skills
tailwind-ui-patterns
Tailwind CSS v4 patterns, component styling, and responsive design
159typescript-refactoring-patterns
Expert TypeScript refactoring patterns for cleaner, type-safe code
58python-fastapi-patterns
FastAPI best practices, async patterns, and Pydantic validation
45api-design-restful
RESTful API design patterns, error handling, and documentation
31cli-tool-development
Build professional CLI tools with Node.js, commander, and Ink
16nextjs-app-router-mastery
Next.js 14+ App Router patterns, server components, and data fetching
15