# react

Guidance for building and reviewing React 19 components and hooks with React Compiler in mind. Use it for compiler setup, state and Effects decisions, or component tests.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 448 installs · ★ 643
- Author: Pedro Nauck
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pedronauck/skills/tree/HEAD/skills/mine/react/SKILL.md
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/skills/pedro-nauck-react

## What it does

This skill covers React 19.2 and React Compiler 1.0, from render purity and mutation to refs, state, and Effects. It helps decide when manual `useMemo` or `useCallback` still matters and when the compiler handles component work. An incomplete dependency list can make the compiler skip optimization, so lint rules are part of the workflow.

Topic-specific references cover compiler and lint setup, component structure and types, state, React 19 APIs, and testing. Read the reference relevant to the change; bring in adjacent material when the task crosses topics. Testing guidance uses Vitest.

The target stack is React 19.2, React Compiler 1.0, and `eslint-plugin-react-hooks` 7.1+. React Native, other frameworks, and backend-only Node.js are outside its scope. Set up linting before enabling the compiler: a rule violation can leave a component unoptimized without failing the build.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pedronauck/skills --skill react -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/react/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/react/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add pedronauck/skills --skill react -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/react/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add pedronauck/skills --skill react -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/react/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install pedronauck/skills react
```

2. **Manually: put the files in place**
- File: `.github/skills/react/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add pedronauck/skills --skill react -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pedronauck/skills --path skills/mine/react
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/react/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add pedronauck/skills --skill react -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/pedronauck/skills/tree/HEAD/skills/mine/react/SKILL.md

## When to use it
- decide whether a component needs manual memoization
- review Effects and derived state
- configure React Compiler and its lint rules
- write or repair component and hook tests

## Example prompts
- Review this component against React Compiler rules and explain which manual memoization should stay.
- Show how to avoid copying derived state inside an Effect when the React rules allow it.
- Help me test this hook using the skill's testing guidance.

## Similar
- [frontend-design](https://affpapa.org/en/nevibecode/skills/frontend-design.md) — skill · 1025790 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs
- [hyperframes](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes.md) — skill · 1200000 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [webapp-testing](https://affpapa.org/en/nevibecode/skills/webapp-testing.md) — skill · 186758 installs

## Other versions with the same name
- [react · vercel-labs](https://affpapa.org/en/nevibecode/skills/react.md) — 16300 installs
- [react · mindrally](https://affpapa.org/en/nevibecode/skills/mindrally-react.md) — 944 installs
- [react · pproenca](https://affpapa.org/en/nevibecode/skills/pproenca-react.md) — 489 installs

From the same set: [pedronauck/skills](https://affpapa.org/en/nevibecode/by/pedronauck/skills.md) — 18 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
