react-19

Optimize React 19 component rendering with compiler-driven memoization.

Updated Aug 8, 2025
One-click install
npx skills add https://github.com/Albarracin-sg/MIS-DOTFILES --skill react-19-albarracin-sg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-19
Source: https://github.com/Albarracin-sg/MIS-DOTFILES/tree/main/tools/opencode/skill/react-19
Command: npx skills add https://github.com/Albarracin-sg/MIS-DOTFILES --skill react-19-albarracin-sg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables building React 19 components with compiler-driven optimization, eliminating the need for useMemo/useCallback and reducing boilerplate.

Core Features & Use Cases

  • Server Components First: default to server components and only mark client components when interactive needs arise.
  • Guided Import Patterns: prefer named imports from react to enable tree-shaking and proper hooks usage.
  • No Manual Memoization: avoid useMemo and useCallback, relying on React 19 compiler optimizations.
  • Ref Prop Pattern: treat ref as a prop to simplify component APIs.
  • Use of use() for suspense when consuming promises.

Quick Start

Start by creating a server component and then introduce a client component with 'use client' only where interactivity is required.

Frequently Asked Questions about react-19

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

FAQPage Schema
How do I write React 19 components without manual memoization?

To write React 19 components without manual memoization, rely on the compiler-driven optimization by removing useMemo and useCallback, and adopt a server component-first approach with proper hook-based patterns.

Do I need useMemo and useCallback in React 19 for performance?

You do not need useMemo and useCallback in React 19 for performance, as the compiler-driven optimization automatically handles memoization, reducing boilerplate while ensuring efficient component rendering.

When should I use 'use client' in React 19 server components?

You should use 'use client' in React 19 only when interactivity is required. The recommended approach is server components first, introducing client component boundaries solely for interactive needs.

How does the use() hook work with Suspense for promises in React 19?

The use() hook works with Suspense in React 19 by consuming promises directly within your components, enabling asynchronous data fetching patterns without requiring higher-order wrappers or complex state management.

What is the best way to handle imports and ref props in React 19?

The best way to handle imports is using named imports from React for tree-shaking, while treating ref as a prop to simplify component APIs, ensuring clean boundaries between server and client components.