# React

> The React standard — conventions for writing and reviewing React code. Read the sub-file for whatever the change touches.

- Skill: `elliottlawson/react` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add elliottlawson/react`
- Raw SKILL.md: https://api.skillmd.com/api/skills/elliottlawson/react/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: elliottlawson (https://skillmd.com/u/elliottlawson)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/elliottlawson/react

---


# React

Apply these conventions when you're writing or reviewing React code. Read
the sub-file for whatever the change touches:

| The change involves... | Read |
|---|---|
| Hooks (`useState`, `useEffect`, custom hooks) | `hooks.md` |

## Core

- **Components are pure.** Props and state in, UI out. No side effects during
  render — effects exist for that.
- **Derived state is computed, not stored.** If a value can be calculated from
  props or other state, calculate it — don't sync it into `useState`.
- **Keys are stable identity.** No array-index keys on lists that reorder,
  filter, or grow.
- **State lives as low as possible.** Lift state only when a second consumer
  actually needs it.

