react-19-patterns

Implement React 19 patterns for Server and Client components with TypeScript.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Barnhardt-Enterprises-Inc/quetrex-plugin --skill react-19-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-19-patterns
Source: https://github.com/Barnhardt-Enterprises-Inc/quetrex-plugin/tree/main/templates/skills/react-19-patterns
Command: npx skills add https://github.com/Barnhardt-Enterprises-Inc/quetrex-plugin --skill react-19-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adopting new React features and patterns can be challenging, leading to confusion or incorrect usage of powerful new hooks and component types. This Skill provides a complete guide to React 19's latest features and best practices, empowering you to build modern, performant UIs with confidence.

Core Features & Use Cases

  • Comprehensive Hooks Guide: Covers use(), useOptimistic, useFormStatus, and useActionState with practical examples, simplifying their adoption.
  • Server & Client Component Patterns: Guides on effective use of Server and Client Components for optimal performance and clear separation of concerns.
  • Streaming & Suspense: Explains how to implement progressive loading and improve user experience by rendering UI as data becomes available.
  • Use Case: When implementing a form that requires optimistic UI updates, activate this Skill. It will guide you on how to correctly use the useOptimistic hook, providing immediate feedback to the user while the server processes the request, enhancing user experience.

Quick Start

I need to read a Promise directly in my component. Show me how to use the new use() hook.

Frequently Asked Questions about react-19-patterns

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

FAQPage Schema
How do I use React 19's new `use()` hook to read promises in components?

The `use()` hook lets you read Promise values directly in components. Call `use(promise)` to unwrap the resolved value, and wrap your component in Suspense to handle loading states. It works with both Server and Client Components for cleaner async data handling.

What's the best way to implement optimistic UI updates in React 19?

Use the `useOptimistic` hook to instantly reflect user actions on screen while the server processes the request. It maintains local state changes that revert if the server action fails, providing immediate feedback and smoother form interactions.

How do Server and Client Components work together in React 19?

Server Components render on the server and send HTML to the browser, reducing bundle size and enabling direct database access. Client Components run in the browser for interactivity. Use Server Components by default for data fetching and logic, Client Components for event handlers and hooks.

Can I migrate from React 18 to React 19 without rewriting my entire app?

React 19 maintains backward compatibility with React 18 code. Migrate incrementally by adopting new hooks like `useFormStatus` and `useActionState` for forms, and transition existing components to Server Components where beneficial. TypeScript support ensures type safety throughout.

How does streaming with Suspense improve React 19 app performance?

Streaming renders UI progressively as data becomes available instead of waiting for everything to load. Suspense boundaries pause rendering at specific components, showing fallbacks while data loads, delivering faster perceived performance and better user experience.

What are the key differences between `useFormStatus` and `useActionState` in React 19?

`useFormStatus` tracks the status of a parent form action, showing pending state for submit buttons. `useActionState` wraps a server action and manages both status and returned state, letting you handle results and errors from async operations directly.