react

Enforce React component discipline for pure components, minimal state, and correct hook usage.

19|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/xobotyi/cc-foundry --skill react-xobotyi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/xobotyi/cc-foundry/tree/main/plugins/frontend/skills/react
Command: npx skills add https://github.com/xobotyi/cc-foundry --skill react-xobotyi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces best practices for building robust, maintainable, and performant React applications, preventing common pitfalls in component design, state management, and hook usage.

Core Features & Use Cases

  • Component Purity: Ensures components are pure functions, leading to predictable behavior.
  • State Management: Guides optimal state placement and usage with useState, useReducer, and Context.
  • Hook Best Practices: Promotes correct usage of hooks, especially useEffect as an escape hatch.
  • Use Case: When writing or reviewing React code, this Skill ensures adherence to modern patterns like composition over configuration, minimal state, and correct hook lifecycles, leading to cleaner and more efficient UIs.

Quick Start

Apply React component best practices to the provided code snippet.

Frequently Asked Questions about react

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for React component design and hook usage?

To manage React component state optimally, you should minimize stateful logic, position state at the correct component level, and choose between useState, useReducer, and Context based on complexity. This approach prevents unnecessary re-renders and maintains performance.

How do I keep my React components pure and predictable?

To keep React components pure, you must ensure they function strictly as pure functions without side effects, applying composition over configuration. This leads to predictable behavior and cleaner, more efficient user interfaces.

When should I use useEffect in React hooks?

You should use useEffect in React as an escape hatch for synchronizing external systems rather than for data transformations. Correct hook lifecycles and minimal usage prevent common pitfalls and maintain component purity.

Does this approach work for reviewing existing React code?

Yes, this approach works for reviewing existing React code by checking it against modern patterns for component purity, state management, and correct hook lifecycles. It ensures adherence to best practices for robust, performant applications.