react-19

Implement React 19 components and hooks with React Compiler rules in TSX files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to writing React 19 components and hooks using the React Compiler rules, helping teams adopt consistent patterns and reduce boilerplate.

Core Features & Use Cases

  • Server Components First: Default to server components with explicit client components when interactivity is required.
  • Correct Imports & Hook Usage: Enforces named imports and standard hook usage patterns for React 19.
  • Guided Patterns for Props & Memoization: Demonstrates recommended patterns for refs as props and avoiding unnecessary manual memoization.

Quick Start

Create a new TSX component that is a server component by default and add a child client component using "use client" only where interactive behavior is needed.

Frequently Asked Questions about react-19

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

FAQPage Schema
How do I structure React 19 components with server components by default?

React 19 server components should be the default in TSX files, requiring explicit 'use client' directives only when interactive behavior is needed. This standardizes imports and component types for modern React projects.

Do I need to manually memoize components when using React Compiler?

Manual memoization is unnecessary when using React Compiler rules. The compiler automatically handles optimization, allowing you to write standard hooks and components while reducing boilerplate.

What is the best way to use 'use client' in Next.js App Router?

The best way to use 'use client' in Next.js App Router is explicitly adding it to TSX files only where interactive behavior is required, keeping all other components as server components by default.

How do I pass refs as props in React 19?

React 19 supports recommended patterns for passing refs as props directly. This Skill demonstrates proper ref usage alongside standard hook patterns to ensure correct interactive behavior.

Does this React 19 pattern work with Next.js server actions?

Yes, these React 19 patterns apply to modern React projects using Next.js App Router and server actions. They standardize imports, component types, and interactive behavior across TSX files.

Why avoid unnecessary 'use client' directives in React 19?

Avoiding unnecessary 'use client' directives maintains the server components first approach in React 19. This reduces boilerplate and ensures proper import patterns by defaulting to server components.