Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

React 19

ASecurity

Build modern user interfaces with React 19, including Server Components, Actions, hooks, and the new compiler. Use for any interactive UI work.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsjavascripttypescriptgojavabashreacttestingfrontendperformance

Works with

cli

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned 9/29/2026

$npx -y skills add ssrjkk/claude-skills --skill react-19 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React 19?

Add the live security badge to your README — it updates automatically with every re-scan.

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

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

Download with Pro
Files
SKILL.md
---
name: react-19
description: "Build modern user interfaces with React 19, including Server Components, Actions, hooks, and the new compiler. Use for any interactive UI work."
category: frontend
tags: [react, ui, javascript, typescript, frontend, components]
models: [sonnet, opus, gpt-5, gemini-2.5, glm-4.6]
version: 1.0.0
author: ssrjkk
created: 2026-09-20
updated: 2026-09-28
---
# React 19

> Building fast, interactive user interfaces with React 19.

## Quick Start
```bash
npx create-react-app@latest my-app
# or with a build tool you control:
npm create vite@latest my-app -- --template react-ts
cd my-app
npm run dev
```

## When to Use
- Any interactive web UI, from small widgets to full applications
- Teams already invested in the React ecosystem
- Projects needing rich client-side state and rendering
- Server Components when you want to reduce client JS

## Best Practices

### Component Design
- Split UI into small, focused components with clear props
- Keep components pure: derive state instead of mutating during render
- Use composition over prop drilling
- Prefer `useMemo`/`useCallback` only when profiling shows a need

### Server Components (App Router)
- Default to Server Components; add `"use client"` only where needed
- Keep data fetching in Server Components
- Pass serializable props across the boundary
- Move event handlers and interactive state into Client Components

### State Management
- Prefer local state and derived values first
- Add a store (Zustand/Redux) only when state is genuinely shared
- Colocate state with the components that use it

## Dependencies
```bash
npm create vite@latest app -- --template react-ts
cd app
npm i react@19 react-dom@19
npm i -D typescript @types/react @types/react-dom
```

## Examples
```tsx
// A Server Component that fetches and renders
export default async function PostsPage() {
  const posts = await getPosts();
  return (
    <main>
      <h1>Posts</h1>
      {posts.map((p) => <PostCard key={p.id} post={p} />)}
    </main>
  );
}
```
```tsx
// A Client Component with Actions and optimistic updates
"use client";
import { useActionState, useOptimistic } from "react";

async function addTodo(prev: string[], formData: FormData) {
  const title = String(formData.get("title"));
  return [...prev, title];
}

export function TodoList() {
  const [items, setItems] = useActionState(addTodo, []);
  return (
    <form action={addTodo}>
      <input name="title" />
      <button>Add</button>
      <ul>{items.map((t) => <li key={t}>{t}</li>)}</ul>
    </form>
  );
}
```
```tsx
// Custom hook pattern with cleanup
import { useEffect, useState } from "react";

export function useWindowSize() {
  const [size, setSize] = useState({ w: window.innerWidth, h: window.innerHeight });
  useEffect(() => {
    const onResize = () => setSize({ w: window.innerWidth, h: window.innerHeight });
    window.addEventListener("resize", onResize);
    return () => window.removeEventListener("resize", onResize);
  }, []);
  return size;
}
```
```tsx
// Suspense with lazy loading
import { lazy, Suspense } from "react";
const Chart = lazy(() => import("./Chart"));

export default function Dashboard() {
  return (
    <Suspense fallback={<div>Loading chart...</div>}>
      <Chart />
    </Suspense>
  );
}
```

## Step-by-Step
1. Scaffold with Vite (`react-ts` template) — it is faster and more configurable than CRA.
2. Set up TypeScript strict mode and ESLint + Prettier before writing features.
3. Model the UI as a tree of small components; sketch props at each level.
4. Default to Server Components; add `"use client"` for interactive parts.
5. Use Actions for mutations (form actions, optimistic updates) instead of manual fetch chains.
6. Add Suspense boundaries around async sections; avoid blocking the whole page.
7. Profile with React DevTools; memoize only what the profiler shows as hot.
8. Write tests with Vitest + React Testing Library, preferring user-centric queries.

## Validation
1. App builds with `npm run build` and passes `tsc --noEmit`
2. All interactive elements reachable by keyboard
3. No layout shift after async data loads
4. React DevTools shows no unnecessary re-renders
5. Lighthouse performance score >= 90 for key routes

## Troubleshooting
- "Too many re-renders": setState called during render — move it into an event or effect.
- Hydration mismatch: ensure Server and Client render identical markup; avoid `Date.now()` in render.
- State reset unexpectedly: key props determine identity — keep keys stable.

Attribution

ssrjkkssrjkk
View sourceSee grades on GitHubMore from ssrjkk →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →