← ClaudeAtlas

reactlisted

React component discipline: pure components, minimal state, effects as escape hatches. Invoke whenever task involves any interaction with React code — writing, reviewing, refactoring, debugging, or understanding JSX, hooks, component architecture, state management, or performance optimization.
xobotyi/cc-foundry · ★ 23 · Code & Development · score 81
Install: claude install-skill xobotyi/cc-foundry
# React **Components are pure functions. State is minimal. Effects are escape hatches. If you reach for useEffect, verify you actually need it.** React rewards thinking in components: break UI into pieces, find minimal state, identify where it lives, and wire data flow from parent to child. References contain extended examples, rationale, and edge cases for each topic area. ## References - **Components** — `${CLAUDE_SKILL_DIR}/references/components.md` Composition, refs, metadata, custom elements - **Hooks** — `${CLAUDE_SKILL_DIR}/references/hooks.md` Hook rules, custom hooks, `useSyncExternalStore` - **State** — `${CLAUDE_SKILL_DIR}/references/state.md` Placement, reducers, context, actions - **Performance** — `${CLAUDE_SKILL_DIR}/references/performance.md` Compiler, memoization, server components, streaming - **Testing** — `${CLAUDE_SKILL_DIR}/references/testing.md` Query priority/variants, userEvent catalog, async patterns ## Component Design ### Thinking in React Build UI in five steps: 1. Break UI into a component hierarchy — each component does one thing. 2. Build a static version first — props only, no state, no interactivity. 3. Find minimal state — if it doesn't change, is passed from a parent, or can be computed, it is not state. 4. Identify where state lives — find every component that renders based on the state, find their closest common parent, put state there. 5. Add inverse data flow — pass state-setter callbacks down so children update parent state