Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guide for React 19 development with Actions, Server Components, and new hooks. Use for building React 19 apps, form handling, optimistic updates, and migrations.
.claude/skills/aiskillstore-react-19/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 63% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 87% | 0% |
| case-21 | ✓→✓ | = Same ✓ | 56% | 0% |
React 19 (stable since Dec 2024) simplifies async operations, improves SSR, and enhances DX with Actions, Server Components, and new hooks.
bashnpm install react@19.2.1 react-dom@19.2.1 npm install --save-dev @types/react@19.0.0 @types/react-dom@19.0.0
Required: Enable modern JSX transform in tsconfig.json:
json{ "compilerOptions": { "jsx": "react-jsx" } }
| Type | Runs | State | Access | |------|------|-------|--------| | Server Component | Server | No | DB, FS, Secrets | | Client Component | Browser | Yes | DOM, Browser APIs | | Server Action | Server | No | DB, APIs |
"use server" = Server Action"use client" = Client Componentasync component = Auto-suspendsjavascript'use client'; import { useActionState } from 'react'; function SignupForm() { const [state, formAction, isPending] = useActionState( async (prev, formData) => { const error = await createUser(formData.get('email')); return error ? { error } : null; }, { error: null } ); return ( <form action={formAction}> <input type="email" name="email" required /> <button disabled={isPending}> {isPending ? 'Signing up...' : 'Sign Up'} </button> {state.error && <p>{state.error}</p>} </form> ); }
javascript'use client'; import { useOptimistic } from 'react'; function Comments({ comments, addComment }) { const [optimistic, addOptimistic] = useOptimistic( comments, (curr, newComment) => [...curr, { ...newComment, pending: true }] ); return ( <div> {optimistic.map(c => <div key={c.id}>{c.text}</div>)} <form action={async (formData) => { addOptimistic({ id: Date.now(), text: formData.get('text') }); await addComment(formData); }}> <input name="text" /> <button>Post</button> </form> </div> ); }
javascript'use server'; export async function createPost(formData) { const title = formData.get('title'); if (!title || title.length < 3) { return { error: 'Title too short' }; } await db.posts.create({ title }); revalidatePath('/posts'); }
javascriptexport default function Dashboard() { return ( <div> <Suspense fallback={<Skeleton />}> <RevenueCard /> </Suspense> <Suspense fallback={<Skeleton />}> <UsersCard /> </Suspense> </div> ); } async function RevenueCard() { const data = await db.analytics.getRevenue(); return <div>{data}</div>; }
javascript// 1. Always authenticate 'use server'; export async function deleteUser(id) { const user = await getCurrentUser(); if (!user) throw new Error('Unauthorized'); await db.users.delete(id); } // 2. Keep secrets server-side 'use server'; export async function fetchData() { const secret = process.env.API_SECRET; // Inside function! return fetch(url, { headers: { Authorization: `Bearer ${secret}` }}); } // 3. Validate inputs import { z } from 'zod'; const schema = z.object({ email: z.string().email() }); const result = schema.safeParse(formData);
See references/security-guide.md for complete security guidance.
npm install react@19 react-dom@19npx codemod@latest react/19/migration-recipenpx types-react-codemod@latest preset-19 ./srcKey breaking changes:
ReactDOM.render → createRootPropTypes removed → Use TypeScriptforwardRef deprecated → Use ref as propuseRef() requires argument → useRef(null)See references/upgrade-checklist.md and references/migration-patterns.md.
| Hook | Purpose | |------|---------| | useActionState | Form state with async actions | | useOptimistic | Instant UI feedback | | use() | Read promises/context (can be conditional) | | useTransition | Non-urgent updates |
See references/hooks-api.md for detailed API docs.
| Task | Solution | |------|----------| | Forms | useActionState + Server Actions | | Instant UI | useOptimistic | | Data fetching | Server Components with async/await | | Refs | ref as regular prop | | Progressive rendering | Suspense boundaries |
Version: 2.1 | Updated: 2025-12-27
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-20 | pass→pass | 17,280 | 19,519 | +13% | 1 | 1 | 0% | 2,272 | 4,245 | +87% | 0 | 0 | — |
case-21 | pass→pass | 17,833 | 16,564 | -7% | 1 | 1 | 0% | 2,472 | 3,848 | +56% | 0 | 0 | — |
case-22 | pass→pass | 15,908 | 18,465 | +16% | 1 | 1 | 0% | 2,200 | 4,558 | +107% | 0 | 0 | — |
case-01 | pass→pass | 21,849 | 22,204 | +2% | 1 | 1 | 0% | 3,107 | 5,279 | +70% | 0 | 0 | — |
case-02 | pass→pass | 18,521 | 27,064 | +46% | 1 | 1 | 0% | 3,082 | 3,902 | +27% | 0 | 0 | — |
case-03 | pass→pass | 21,109 | 15,427 | -27% | 1 | 1 | 0% | 2,486 | 3,707 | +49% | 0 | 0 | — |
case-04 | pass→pass | 26,192 | 23,100 | -12% | 1 | 1 | 0% | 4,324 | 6,122 | +42% | 0 | 0 | — |
case-05 | pass→pass | 19,683 | 16,862 | -14% | 1 | 1 | 0% | 2,848 | 3,810 | +34% | 0 | 0 | — |
case-06 | fail→fail | 15,732 | 20,367 | +29% | 1 | 1 | 0% | 3,056 | 4,505 | +47% | 0 | 0 | — |
case-07 | fail→pass | 13,268 | 10,306 | -22% | 1 | 1 | 0% | 1,578 | 2,573 | +63% | 0 | 0 | — |
case-08 | pass→pass | 14,903 | 8,419 | -44% | 1 | 1 | 0% | 1,654 | 3,025 | +83% | 0 | 0 | — |
case-09 | pass→pass | 26,925 | 18,682 | -31% | 1 | 1 | 0% | 3,384 | 3,955 | +17% | 0 | 0 | — |
case-15 | pass→pass | 23,511 | 21,366 | -9% | 1 | 1 | 0% | 3,427 | 4,877 | +42% | 0 | 0 | — |
case-10 | pass→pass | 8,304 | 7,544 | -9% | 1 | 1 | 0% | 1,364 | 2,771 | +103% | 0 | 0 | — |
case-11 | pass→pass | 7,836 | 8,853 | +13% | 1 | 1 | 0% | 1,296 | 2,005 | +55% | 0 | 0 | — |
case-12 | pass→pass | 20,736 | 17,239 | -17% | 1 | 1 | 0% | 2,550 | 3,720 | +46% | 0 | 0 | — |
case-13 | pass→pass | 6,480 | 11,726 | +81% | 1 | 1 | 0% | 1,139 | 2,686 | +136% | 0 | 0 | — |
case-14 | fail→pass | 12,332 | 3,727 | -70% | 1 | 1 | 0% | 1,522 | 2,246 | +48% | 0 | 0 | — |
case-16 | pass→pass | 12,194 | 9,879 | -19% | 1 | 1 | 0% | 1,353 | 2,527 | +87% | 0 | 0 | — |
case-17 | pass→pass | 21,391 | 19,455 | -9% | 1 | 1 | 0% | 2,837 | 4,355 | +54% | 0 | 0 | — |
case-18 | fail→pass | 14,709 | 12,069 | -18% | 1 | 1 | 0% | 1,863 | 2,779 | +49% | 0 | 0 | — |
case-19 | pass→pass | 19,674 | 14,538 | -26% | 1 | 1 | 0% | 2,411 | 4,216 | +75% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.