react

Standardize React function components, hooks, and performance patterns.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/dotBeeps/pantry --skill react-dotbeeps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react
Source: https://github.com/dotBeeps/pantry/tree/main/morsels/skills/react
Command: npx skills add https://github.com/dotBeeps/pantry --skill react-dotbeeps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardizes React coding practices to promote consistency and maintainability across teams.

Core Features & Use Cases

  • Function components only; file name matches component name; e.g., UserCard.tsx
  • Hooks: top-level usage; custom hooks for shared logic named use<Thing>; avoid stateful patterns that break in render
  • State & Performance: lift state when needed; derive values in render; prefer reducers for complex flows

Quick Start

Apply these conventions to a React project to ensure consistent component design and hook usage.

Frequently Asked Questions about react

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

FAQPage Schema
What are the standard React conventions for structuring function components?

Standard React conventions require using function components only and ensuring the file name matches the component name, such as UserCard.tsx. This approach standardizes component design and promotes consistency across modern frontend projects.

How do I name and structure custom hooks in a React project?

To structure custom hooks in a React project, name shared logic hooks using the use<Thing> pattern and always call them at the top level. This prevents stateful patterns that break during render and ensures consistent hook usage.

What is the best way to manage complex state flows in React?

The best way to manage complex state flows in React is to prefer reducers. You should also lift state when needed and derive values directly in render to maintain performance and standardize state management across the application.

Does this React coding standard apply to my existing frontend project?

Yes, these React coding standards apply to modern frontend projects using React where consistent component design, hook usage, and performance patterns are essential. You can apply these conventions to ensure maintainability across teams.

When should I avoid lifting state in React components?

You should avoid unnecessary state lifting in React components when you can derive values directly in render instead. Over-lifting state can complicate flows, whereas deriving values maintains standard performance patterns.