React — component design, state placement, hooks rules and effects discipline, server state with query libraries, Server Components where used, memoization when measured, forms, error boundaries, accessibility, testing with Testing Library. Use for React code (React, hooks, useEffect, state management, components, Next.js).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of React?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-react)
---
name: react
description: React — component design, state placement, hooks rules and effects discipline, server state with query libraries, Server Components where used, memoization when measured, forms, error boundaries, accessibility, testing with Testing Library. Use for React code (React, hooks, useEffect, state management, components, Next.js).
metadata:
category: languages-frameworks
---
# React
## Purpose
Build React UIs with predictable state and minimal effects.
**Use when:** React components and apps.
**Not for:** frontend framework choice.
## Inputs
- Designs, API contracts, code.
## Outputs
- Components, tests, review findings.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "react"` for prior decisions, patterns and anti-patterns.
## Steps
1. **State.** Place state at the lowest common owner; derive instead of syncing.
Done when no duplicated state.
2. **Effects.** Use effects only to sync with external systems; data fetching via a query library.
Done when no effect computes derived state.
3. **Resilience.** Error boundaries and loading/empty/error states.
Done when every async view handles all states.
4. **Tests.** Test behaviour with Testing Library by role and name.
Done when tests avoid implementation details.
## Best practices
- Memoize only after profiling.
- Stable keys from data ids.
## Common mistakes
- `useEffect` chains to sync state.
- Index as key in dynamic lists.
## Example
Invoice list with TanStack Query, optimistic update on mark-paid with rollback, tests by role.
## Reusable prompt
```text
Apply the React skill (.agents/skills/react/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Design or review the components: state placement, effects, async states and behaviour tests.
Return: Components, tests, review findings..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```