React 19 Cheat Sheet by Kent C.
Dodds
EpicReact.dev
React Server Components 'use client' Better Error Reporting
Server-rendered components that execute at build time or per request. Marks code that can be referenced by the server component and can Automatically de-duplicates errors, and introduces onCaughtError
use client-side React features. and onUncaughtError handlers for root components.
'use server'
Marks server-side functions callable from client-side code.
use
Reads resources like promises or context during render, allowing for
Actions
conditional use.
Async functions that handle form submission, error states, and
optimistic updates automatically.
Ref Callback Cleanup
useActionState Document Metadata Support Ref callbacks can now return a cleanup function.
Manages form state, providing degraded experiences when JavaScript Automatically hoists <title>, <meta>, and <link> tags to the
is unavailable. <head>.
Streamlined Context API
Use <Context> directly instead of <Context.Provider>.
useFormStatus Stylesheets with Precedence
Access the status of a parent form without prop drilling. Support for inserting stylesheets with precedence in concurrent
rendering environments.
useDeferredValue Initial Value
The useDeferredValue hook now supports an initial value.
useOptimistic
Show optimistic state while async requests are in progress.
Hydration Error Diffs
Resource Preloading APIs
Improved error logging for hydration errors, providing a detailed diff
Preload resources like fonts, scripts, and styles to optimize when mismatches occur.
Async Script Support
performance.
Render async scripts anywhere in your component tree, with automatic
deduplication.
Custom Element Support
Improved Third-Party Script Compatibility
React now fully supports custom elements and handles properties/
Unexpected tags in <head> and <body> are skipped during hydration, ref as a Prop
attributes consistently.
avoiding mismatch errors. Pass refs directly as props in function components.