Skip to content
Back to skills

React

ASecurity

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).

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgoreactnextjstestingapifrontend

Works with

  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add vectora-os/kit --skill react --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectora-os-react/badge)](https://www.skillsdirectory.com/skills/vectora-os-react)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.