Change8

Migrating to React v19.1.0

Version v19.1.0 introduces 4 breaking changes. This guide details how to update your code.

Released: 3/28/2025

4
Breaking Changes
4
Migration Steps
12
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

captureOwnerStackuseIdReact.actuseEffectuseInsertionEffectuseLayoutEffectunstable_prerenderregisterServerReferenceSuspensePortalOffscreenComponentuse-sync-external-store

Breaking Changes

Issue #1

React.act is no longer available in production builds; it is now strictly a development-only method.

Issue #2

Removed support for using HTML comments (e.g. <!-- -->) as a DOM container for React DOM.

Issue #3

The useId format has changed from ':r123:' to '«r123»' to ensure valid CSS selectors, which may affect CSS selectors relying on the old format.

Issue #4

Updated the server component wire format to remove IDs for hints and console.log.

Migration Steps

  1. 1
    Ensure React.act is only used in test or development environments, as it is removed from production.
  2. 2
    Update any DOM mounting logic that relies on HTML comments as containers to use element nodes instead.
  3. 3
    Check CSS stylesheets or automated tests that might target useId generated IDs, as the string format has changed.
  4. 4
    If using use-sync-external-store with specific entrypoints, verify compatibility with the new exports field.

Release Summary

This release introduces Owner Stacks for enhanced development debugging and the experimental unstable_prerender API for Server Components. It also includes significant improvements to Suspense hydration, CSS-compliant useId formatting, and various bug fixes across React DOM and Server Components.

Need More Details?

View the full release notes and all changes for React v19.1.0.

View Full Changelog