react-19

Enforce React 19 patterns with React Compiler and Server Components.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/yousufaltayeb/cms --skill react-19-yousufaltayeb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-19
Source: https://github.com/yousufaltayeb/cms/tree/main/apps/web/.agents/skills/react-19
Command: npx skills add https://github.com/yousufaltayeb/cms --skill react-19-yousufaltayeb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write modern React 19 components and hooks, leveraging the React Compiler for automatic optimizations and adhering to best practices for server components, client components, and the new use() hook.

Core Features & Use Cases

  • Automatic Optimization: Write components without manual memoization (useMemo, useCallback) as the React Compiler handles it.
  • Modern Imports: Enforces named imports for React hooks and functions.
  • Server/Client Components: Guides the correct usage of Server Components (default) and Client Components ("use client" directive).
  • use() Hook: Demonstrates the use of the use() hook for reading promises and conditional context.
  • Actions & useActionState: Provides examples for server actions and managing pending states.
  • ref as Prop: Illustrates the simplified way to pass refs in React 19.

Quick Start

Write a new React 19 component using named imports and no manual memoization.

Frequently Asked Questions about react-19

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

FAQPage Schema
How do I stop using useMemo and useCallback in React 19?

React 19 uses the React Compiler for automatic optimization, allowing you to write components without manual memoization like useMemo or useCallback. The compiler handles performance optimizations automatically during the build process.

What is the use() hook in React 19 and how does it work?

The use() hook in React 19 reads promises and context conditionally within components. Unlike other hooks, it can be called inside conditional statements to directly access resolved promise values or context data.

How do I use Server Components and Client Components in Next.js App Router?

Next.js App Router defaults to Server Components. You must add the "use client" directive at the top of a file to designate it as a Client Component when client-side interactivity is required.

Do I need to use forwardRef to pass refs in React 19?

You do not need forwardRef to pass refs in React 19. React 19 treats ref as a standard prop, simplifying how refs are passed to child components without extra wrapper functions.

How do I manage form pending states with useActionState in React 19?

You use useActionState with server actions in React 19 to manage pending states automatically. This hook provides the pending status directly from the server action execution for form handling.

Why should I use named imports for React hooks in React 19?

Named imports for React hooks are enforced in React 19 to ensure modern import conventions. This practice aligns with the compiler's optimization strategy and maintains consistent module loading.