react-19

Refactor React 19 components to remove manual useMemo and useCallback.

Updated Nov 19, 2024
One-click install
npx skills add https://github.com/Strocs/.dotfiles --skill react-19-strocs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-19
Source: https://github.com/Strocs/.dotfiles/tree/main/.config/opencode/skills/react-19
Command: npx skills add https://github.com/Strocs/.dotfiles --skill react-19-strocs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the boilerplate and performance pitfalls of traditional React patterns by promoting React 19 compiler-based optimization, eliminating manual useMemo/useCallback in common cases, and guiding correct component structure.

Core Features & Use Cases

  • Enforces server components first and client components only where needed.
  • Promotes explicit imports from React hooks and avoids legacy default imports.
  • Demonstrates patterns for use(), useActionState, and ref-as-prop to simplify component logic.

Quick Start

Refactor components to rely on React 19 compiler optimizations and follow the recommended import and server/client patterns.

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?

To remove manual memoization in React 19, refactor components to rely on the React compiler for automatic optimization, eliminating the need for manual useMemo and useCallback hooks in common cases.

What is the server components first pattern in React 19?

The server components first pattern in React 19 enforces building with server components by default and adding client components only where needed, minimizing boilerplate and optimizing component boundaries.

How do I use the use() hook with React 19 compiler optimization?

You can use the use() hook with React 19 compiler optimization by applying documented patterns like use(), useActionState, and ref-as-prop to simplify component logic alongside explicit named imports from React.

Do I need explicit named imports for React 19 hooks?

Yes, you need explicit named imports for React 19 hooks because the architecture promotes named imports from React and avoids legacy default imports to align with compiler-based optimization.

What are the limitations of using React 19 compiler patterns?

Limitations of using React 19 compiler patterns include the strict requirement for alignment with named imports, a server components-first architecture, and specific documented patterns like useActionState and ref-as-prop.