react-19

Implements React 19.2 hooks, form actions, and migration patterns with reference guides and code templates.

1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/fusengine/kimi-code --skill react-19-fusengine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-19
Source: https://github.com/fusengine/kimi-code/tree/main/plugins/react-expert/skills/react-19
Command: npx skills add https://github.com/fusengine/kimi-code --skill react-19-fusengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React 19 introduced breaking changes and new APIs (use(), useOptimistic, useActionState, Activity, React Compiler) that make older patterns like forwardRef, Context.Provider, and useEffect-based data fetching outdated. This Skill provides verified guidance and ready-to-use templates so you implement React 19.2 correctly the first time. ## Core Features & Use Cases - New Hooks Coverage: Detailed references for use(), useOptimistic, useActionState, useFormStatus, and useEffectEvent, plus all classic hooks (useState, useEffect, useRef, useMemo, and more). - Migration Guidance: React 18 to 19 breaking changes including ref-as-prop, Context as provider, and deprecated API replacements with a phased checklist. - Code Templates: Copy-ready implementations for action forms, optimistic updates, Activity-based tabs, custom hooks, Suspense patterns, virtualization, and lazy loading. - Use Case: When building a form in React 19, use the action-form template with useActionState and useFormStatus to get error handling and pending states without manual state management. ## Quick Start Ask the agent to implement a React 19 form using useActionState with validation and a pending submit button.

Frequently Asked Questions about react-19

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use useActionState for form handling in React 19?▼

useActionState takes an async function and initial state, returning [state, formAction, isPending]. Pass formAction to the form's action attribute, and return errors from the action instead of throwing them. Use useFormStatus in a child component for the submit button's pending state.

How do I migrate from forwardRef to React 19 ref as prop?▼

In React 19, ref is a regular prop, so remove the forwardRef wrapper and add ref to your props interface with type React.Ref<ElementType>. forwardRef still works but is deprecated and will be removed in a future version.

Should I still use useMemo and useCallback with React Compiler?▼

With React Compiler (React 19.1+), manual useMemo and useCallback are mostly obsolete because memoization happens automatically at build time. Only use them for computations over 100ms verified by profiling, stable references for effect dependencies, or third-party libraries requiring stable references.

What is the Activity component in React 19.2 used for?▼

Activity hides components while preserving their state, pausing effects instead of unmounting them. It is experimental (imported as experimental_Activity) and suits tabs, modals, and multi-step wizards where form inputs and state must survive visibility changes.

When should I use use() instead of useEffect for data fetching?▼

Use use() with Suspense for data fetching instead of useEffect, since use() can read promises directly in render and integrates with Suspense boundaries. useEffect remains appropriate for event listeners, timers, subscriptions, and DOM side effects that need cleanup.

Why does useFormStatus not work in my form component?▼

useFormStatus must be called in a child component of the form, not in the component that renders the form itself. Extract your submit button into a separate child component and call useFormStatus there to access the pending state.