react-19

Remove manual memoization from React 19 components for React Compiler optimization.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/giruclawbot/giru-backup --skill react-19-giruclawbot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-19
Source: https://github.com/giruclawbot/giru-backup/tree/main/skills/react-19
Command: npx skills add https://github.com/giruclawbot/giru-backup --skill react-19-giruclawbot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill documents modern React 19 patterns to remove manual memoization and outdated component patterns, allowing developers to rely on the React Compiler and framework features for correct and efficient rendering.

Core Features & Use Cases

  • Eliminate Manual Memoization: Avoid useMemo/useCallback and let the React Compiler handle stable identities and optimizations.
  • Server Components First: Default to server components, using "use client" only for interactive needs like state, effects, and event handlers.
  • Modern APIs & Patterns: Guidance on named imports, use() for reading promises or conditional contexts, server actions with useActionState, and treating ref as a normal prop.
  • Use Case: Build a Next.js page that fetches data on the server, passes it to a lightweight client component for interactivity, and manage form submissions with server actions and pending state indicators.

Quick Start

Start by authoring server components by default, use named imports, avoid useMemo/useCallback, add "use client" only when you need state or event handlers, and use the documented action and use() patterns for async and server interactions.

Frequently Asked Questions about react-19

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

FAQPage Schema
How do I remove manual memoization in React 19 components?

You can remove manual memoization in React 19 by eliminating useMemo and useCallback from your components, relying entirely on the React Compiler to automatically handle stable identities and rendering optimizations.

When should I add the use client directive in Next.js server components?

You should add the "use client" directive in Next.js only when a component requires interactivity, such as managing state, handling effects, or responding to user event handlers.

How do I use the use() hook for promises in React 19?

The use() hook in React 19 allows you to read promises and conditional contexts directly within your components, enabling async data handling without manual memoization or complex wrapper setups.

What is the best way to manage form submissions with useActionState in React 19?

The best way to manage form submissions is using server actions with useActionState, which handles form data transmission and tracks pending state indicators for interactive UI feedback.

Can I pass ref as a normal prop in React 19 without forwardRef?

Yes, React 19 supports ref-as-prop patterns, allowing you to pass ref as a normal prop directly to components without needing the forwardRef wrapper function.

Does the React Compiler work with server components by default?

Yes, the React Compiler works seamlessly when you default to server components, optimizing rendering efficiency while you use named imports and conditional "use client" boundaries for interactivity.