Skip to content
Back to skills

Forge React Components

ASecurity

Write React components and hooks: state placement, effects, performance, forms and testing with Testing Library

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsreacttestingapiperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill forge-react-components --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Forge React Components?

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

Security grade badge for Forge React Components
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-forge-react-components/badge)](https://www.skillsdirectory.com/skills/ansh44233-forge-react-components)

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: forge-react-components
description: "Write React components and hooks: state placement, effects, performance, forms and testing with Testing Library"
---

<!-- Generated from catalog/skills/react-components/SKILL.md by scripts/build-plugin.ts. Edit the catalog, not this file. -->

# React components

Use when building or fixing React UI (web or React Native).

## State and effects
- Keep state as low as possible and derive the rest during render. Do not mirror props into state.
- `useEffect` is for synchronizing with external systems (subscriptions, network, DOM APIs), not for computing values. Most "effect to update state" code should be a calculation or an event handler.
- Every effect that subscribes or starts work needs cleanup. Include all dependencies; do not silence `react-hooks/exhaustive-deps`.
- Server data belongs in a data library (TanStack Query, SWR, framework loaders), not hand-rolled `useEffect` fetches with race conditions.

## Rendering
- Stable, unique `key`s from data ids, never array indexes for lists that change order.
- Memoize (`useMemo`, `useCallback`, `memo`) only when a profiler shows a real cost or a child depends on referential equality.
- Split large components by responsibility; colocate styles and tests.

## Forms and accessibility
- Every input has a label; errors are announced (`aria-describedby`, `aria-invalid`).
- Buttons are `<button>` elements, links are `<a>`; never clickable `div`s.
- Disable double submits and show pending state.

## Testing
React Testing Library: query by role and accessible name (`getByRole("button", { name: /save/i })`), drive with `userEvent`, and assert on what the user sees, not on implementation details.

## Verify
Typecheck, lint (including the hooks rules), component tests, then check the browser console for warnings while using the changed screen.

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.