Modern React component architecture and composition patterns.
Standards for building scalable, maintainable React components.
children prop. Avoid inheritance.<Cmp isVisible /> vs isVisible={true}.Built-in -> External -> Internal -> Styles.react-error-boundary.PascalCase components. use* hooks.Cond ? <A/> : <B/>) over && for rendering consistency.// Composition
export function Layout({ children, aside }: LayoutProps) {
return (
<div className='grid'>
<aside>{aside}</aside>
<main>{children}</main>
</div>
);
}
// Compound Component
export function Select({ children }: { children: ReactNode }) {
return <select>{children}</select>;
}
Select.Option = ({ val, children }) => <option value={val}>{children}</option>;
For advanced patterns (HOCs, Render Props, Compound Components): See references/REFERENCE.md.
hooks | state-management | performance
npx skills add ngxtm/React Component Patterns下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer