npm / react
react
What changed in react 17 to 19, from its official release notes, upgrade guides and advisories. Also covers @types/react, react-dom, react-server-dom-parcel, react-server-dom-turbopack, react-server-dom-webpack. Sources checked 2026-12-05.
75 breaking5 security16 deprecations80 new APIs and options7 performance43 behavior and defaults1 tooling18 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact 19172 changes
Breaking changes 56
Moves react-server-dom-webpack/*.unbundled to the private react-server-dom-unbundled package.
Types were hardened in React Server Components, which may affect developer-written type usage.
act is imported from react instead of react-dom/test-utils.
Legacy Context is removed; migrate class components to the contextType API.
React.createFactory is removed; migrate to JSX.
Moves createRoot to react-dom/client.
Function components no longer support defaultProps; use ES6 default parameters. Class components continue to support defaultProps.
Deprecated TypeScript types associated with removed APIs were cleaned up; some moved to more relevant packages and others are no longer needed.
Removes findDOMNode.
Exhausts its queue even if something throws.
Removes hydrate from react-dom; use hydrateRoot from react-dom/client instead.
Moves hydrateRoot to react-dom/client.
Removes the isAsyncMode method.
Removes the isConcurrentMode method.
react-dom now errors for javascript URLs in src and href.
The global JSX namespace was removed in favor of React.JSX; JSX namespace augmentations must be wrapped in a module declaration.
The layout effect warning during server-side rendering was removed.
Removes legacy mode.
Support for module pattern factories is removed; migrate to regular functions.
React 19 requires the new JSX transform for features including ref as a prop and JSX speed improvements.
errorInfo.digest was removed from onRecoverableError.
Transitions in popstate are now synchronous.
Removes prepareUpdate.
Generates static HTML and waits for data to load, with support for streaming environments.
React removes propType checks; using propTypes is silently ignored. The guide recommends migrating to TypeScript or another type-checking solution.
Throws an error when react and react-dom versions do not match.
All test-utils functions other than act are removed; their exports will be removed in a future version.
Removed; act moved to react and all other utilities were removed.
Removes test-utils.
Deprecated methods were removed from react-is.
Removes the react-test-renderer/shallow export.
Adds a deprecation error to react-test-renderer on web.
The deprecated TypeScript type was removed; the suggested replacement is React.ReactElement | number | string.
Removed in favor of hydrateRoot.
Removed in favor of the concurrent createRoot API.
ReactElement props now default to unknown instead of any when no type argument is provided.
The deprecated TypeScript type was removed; the suggested replacement is Iterable<React.ReactNode>.
The deprecated TypeScript type was removed; the suggested replacement is ReadonlyArray<React.ReactNode>.
The deprecated TypeScript type was removed; the suggested replacement is number | string.
TypeScript now rejects ref callbacks that return anything other than a cleanup function; avoid implicit returns when assigning the ref.
Removes render from react-dom; use createRoot from react-dom/client instead.
Removes renderToStaticNodeStream.
The TypeScript type moved to prop-types.
React internals were renamed, which may affect libraries that depend on them; the recommendation is to remove code that depends on internals.
react-dom warns and does not set an empty string for src or href, except on anchor tags.
String refs in class components are removed; migrate to ref callbacks.
React no longer produces UMD builds; use an ESM-based CDN to load React with a script tag.
ReactDOM.unmountComponentAtNode is removed; use root.unmount().
Removes unmountComponentAtNode.
unstable_createEventHandle was removed from react-dom.
unstable_flushControlled was removed from react-dom.
unstable_renderSubtreeIntoContainer was removed from react-dom.
unstable_runWithPriority was removed from react-dom.
useRef now requires an argument, and its types make refs mutable; overloads support null and undefined initial values.
The deprecated TypeScript type was removed; use FC instead.
The deprecated TypeScript type was removed; use FunctionComponent instead.
Security 5
Adds nonce to rendered import maps.
Added more DoS mitigations to Server Actions to improve application security.
Hardened Server Components to improve application security.
Adds subresource integrity support for bootstrapModules.
Adds subresource integrity support for bootstrapScripts.
Deprecations 8
Development builds warn when a component appears to have been unblocked by calling use() conditionally.
FormEvent is deprecated in the @types/react declarations: FormEvent doesn't actually exist. You probably meant to use ChangeEvent, InputEvent, SubmitEvent, or just SyntheticEvent instead depending on the event type.
FormEventHandler is deprecated in the @types/react declarations: FormEventHandler doesn't actually exist. You probably meant to use ChangeEventHandler, InputEventHandler, SubmitEventHandler, or just EventHandler instead depending on the event type.
Access is deprecated in favor of element.props.ref and results in a warning.
MutableRef is deprecated in favor of a single RefObject type, which useRef always returns.
react-test-renderer logs a deprecation warning and switches to concurrent rendering; the guide recommends modern testing libraries.
Passing a promise created during render to
usewarns; promises must come from a Suspense-compatible library or framework that supports caching.The Canary API name was replaced by
useActionStateanduseFormStateis deprecated.
New APIs and options 56
Adds an API for assigning transition types to React View Transition animations.
Adds a react-dom API that marks a Suspense subtree as browser-only when used with use().
Adds fetchPriority support for module resources.
Adds refs to Fragment components to support composable platform behavior.
Adds support for the maskType SVG prop.
Adds support for the onFullscreenChange event.
Adds support for the onFullscreenError event.
Allows overriding request.timeOrigin through options.startTime.
Adds an option to observe when a subtree defers rendering to the browser.
Enables React integration with the Trusted Types API.
Adds an option to allow partial streams in the Flight Client.
Adds the ViewTransition component to power View Transition animations in React.
Adds a streaming server renderer for Bun.
A context can be rendered directly as a provider instead of using
Context.Provider.Adds an onCaughtError option for custom handling of errors caught by an Error Boundary.
Adds an onUncaughtError option for custom handling of errors not caught by an Error Boundary.
Adds crossorigin support to bootstrap scripts.
Adds fetchPriority support to img and link elements.
Adds Form Actions to handle form submission.
Form-related elements accept functions as
formActionprops to submit forms with Actions.React DOM recognizes imageSizes as a known prop.
React DOM recognizes imageSrcSet as a known prop.
Adds support for inert.
Stylesheet links can specify precedence so React manages DOM insertion order and loads external stylesheets before revealing dependent content.
Adds nonce support to bootstrap scripts.
Allows createRoot and hydrateRoot users to customize handling of errors caught by an Error Boundary.
Adds the onHeaders entrypoint option.
Adds support for the onScrollEnd event.
Allows createRoot and hydrateRoot users to customize handling of errors not caught by an Error Boundary.
Adds support for the Popover API.
Adds a React DOM API for preconnecting to a host to optimize resource loading.
Adds a connection prewarming API as part of Document Metadata support.
Adds a React DOM API for prefetching DNS to optimize resource loading.
Adds a DNS prefetch API as part of Document Metadata support.
Adds a React DOM API for eagerly loading and executing resources such as scripts.
Adds a resource preinitialization API as part of Document Metadata support.
Adds a module preinitialization API as part of Document Metadata support.
Adds a React DOM API for preloading browser resources to optimize resource loading.
Adds nonce and fetchpriority support in preload links.
Adds a resource preload API as part of Document Metadata support.
Adds a module preload API as part of Document Metadata support.
Adds a static-generation API that waits for data to load before returning static HTML, for streaming environments.
Adds a static-generation API that waits for data to load before returning static HTML, for streaming environments.
Libraries shipping Server Components can target React 19 as a peer dependency with a
react-serverexport condition for supported frameworks.Adds referrerPolicy to ReactDOM.preload().
Exports the version.
Function components can access
refas a prop, so new function components no longer needforwardRef; class component refs are not passed as props.Adds a React DOM API for manually resetting a form.
Adds support for the SVG transformOrigin prop.
Adds an API for reading promises and context during render; unlike hooks, it can be called conditionally.
The directive defines Server Actions, allowing Client Components to call asynchronous functions executed on the server.
Adds a hook that wraps an Action and returns its last result and pending state.
Adds an initial value returned on the component's first render while a background re-render with the deferred value is scheduled.
Adds a hook that reads the status of the parent form, including its pending state.
Adds a hook that provides status information about the last form submission.
Adds a hook for displaying an optimistic value while an asynchronous request is in progress, then reverting to the current value when it finishes or errors.
Performance 5
Improves the transport protocol used by React Server Components.
Avoids setting innerHTML when its value has not changed.
Batches updates from resize events until the next frame.
Performance improvements when decoding React Server Components.
React Server Components received performance improvements that may improve application runtime behavior.
Behavior and default changes 25
Adds support for transporting Error.cause through Flight replies.
Allows Server Components to render context providers from client modules.
Includes submitter in submit events and uses the FormData submitter parameter.
Transitions render independently, so a slow transition no longer holds up unrelated transitions.
Transitions render independently instead of being entangled into one render.
Adds full custom element support: server rendering emits eligible primitive props as attributes, while client rendering assigns matching instance properties and otherwise uses attributes.
Components can render title, link, and meta tags, which React automatically hoists to the document head.
Error handling removes duplicate reports and combines error information into a single log message.
The form action prop accepts a function and uses Actions by default; successful submission automatically resets uncontrolled form fields.
Unexpected tags in the head and body are skipped during hydration; stylesheets inserted by third-party scripts or extensions are preserved during a full-document client re-render.
Hydration mismatch reporting now logs a single message with a diff instead of multiple errors without mismatch details.
Adds a server condition for react/jsx-dev-runtime.
Server Components are stable in React 19, but APIs used to implement their bundlers and frameworks may break between React 19 minor versions.
Releases React Server Components as stable.
Strict Mode double-invokes ref callback functions on initial mount in development to surface bugs before production.
Ref callbacks can return cleanup functions, which React calls when the component unmounts; React then skips calling that ref with
null.Async scripts can be rendered anywhere in the component tree and are deduplicated so React loads and executes each script only once.
Can now accept async functions, called Actions, which can perform side effects and keep a Transition pending until their work finishes.
useMemo and useCallback reuse memoized results from the first render during the second; ref callbacks are double-invoked on initial mount.
When a component suspends, React commits the nearest fallback immediately, then renders suspended siblings to pre-warm lazy requests.
Treats toggle and beforetoggle as discrete events.
During Strict Mode's second development render, useCallback reuses the memoized result from the first render.
During Strict Mode's second development render, useMemo reuses the memoized result from the first render.
Improved type inference changes its type-parameter signature: use no type arguments or provide both state and action types; the recommended practice is to omit them.
Ref objects returned from useRef are always mutable instead of sometimes immutable.
Tooling 1
Types were hardened for React Server Components, improving type safety for developers using them.
Fixes and other changes 16
Adds support for transporting AggregateError.errors through Flight replies.
Recognizes credentialless as a boolean iframe attribute and suggests its correct casing.
Updates defaultValue handling for number inputs to match other input types.
Fires onReset when forms are automatically reset.
Forwards the nonce option when preloading modules.
Fixed missing FormData entries in Server Actions.
React Server Components add more cycle protections.
React Server Functions add extra loop protection to prevent problematic execution loops.
Promise cycles and toString behavior on Server Functions were patched.
React Server Component fixes were brought to Server Actions.
React now passes all tests on Custom Elements Everywhere.
Allows hr elements as children of select elements.
React detects infinite update loops caused by render phase updates.
Fixes the unitless scale style property.
On the client, React inserts stylesheets into the head before revealing a Suspense boundary's dependent content.
React forces a client re-render to fix mismatched content caused by elements inserted by third-party JavaScript.
react 1840 changes
Breaking changes 7
act now batches updates.
Missing or extra text content is treated as an error; React reverts to client rendering up to the closest Suspense boundary instead of patching individual nodes.
React depends on Promise, Symbol, and Object.assign; older browsers without compliant native implementations may need a global polyfill in the bundled application.
The unstable scheduler/tracing API was removed.
A fallback value of undefined now behaves the same as null instead of being ignored.
The unsupported API has been removed.
Effects resulting from discrete events such as clicks are flushed synchronously.
Deprecations 7
Deprecated; using it warns and runs the app in React 17 mode.
Deprecated; using it warns and runs the app in React 17 mode.
Deprecated.
Deprecated.
The server rendering API is deprecated.
Deprecated in favor of the new streaming server renderer APIs.
The existing method continues to work but is discouraged in favor of the new server rendering APIs.
New APIs and options 15
React DOM recognizes aria-description as a known ARIA attribute.
Creates a root for rendering or unmounting; use it instead of ReactDOM.render to use new React 18 features.
This global can be set to disable spurious act warnings.
Hydrates a server-rendered application; use it instead of ReactDOM.hydrate to use new React 18 features.
An option accepted by createRoot and hydrateRoot to receive notifications when React recovers from rendering or hydration errors.
Video elements support the onResize event.
Streams server-rendered Suspense content in Node environments.
Streams server-rendered Suspense content in modern edge runtime environments.
React DOM adds selective hydration.
Marks state updates as non-urgent so React can interrupt them for urgent updates and render transition content in the background.
Defers re-rendering a non-urgent part of the tree with an interruptible render that does not block user input.
Generates unique IDs on the client and server while avoiding hydration mismatches.
Lets CSS-in-JS libraries inject styles after DOM mutations but before layout effects read the new layout.
Lets external stores support concurrent reads by forcing store updates to be synchronous; intended for libraries integrating external state.
Provides a Hook to start transitions and track their pending state.
Performance 1
React cleans up more internal fields on unmount, reducing the impact of memory leaks that may exist in application code.
Behavior and default changes 9
State updates in promises, timeouts, native event handlers, and other events are now batched automatically, reducing re-renders.
option elements can have non-string children when a value is provided.
Components are now allowed to render undefined.
When server rendering suspends, it emits fallback HTML for the closest Suspense boundary and retries rendering on the client instead of erroring.
When server rendering suspends, it emits fallback HTML for the closest Suspense boundary and retries rendering the same content on the client instead of erroring.
React no longer warns about calling setState on an unmounted component.
In development, Strict Mode simulates unmounting and remounting components on first mount, restoring state and rerunning effects to surface issues.
Suspense is supported on the server; during a transition, already-visible content can remain visible while React renders suspended content.
If a component suspends before it is fully added to the tree, React discards the incomplete tree and retries rendering after the asynchronous operation finishes.
Fixes and other changes 1
When a tree re-suspends and reverts to a fallback, React cleans up layout effects and recreates them when the boundary content appears again.
react 1733 changes
Breaking changes 12
Using
actin the test renderer no longer flushes Suspense fallbacks.All Capture events now use the browser capture phase.
Experimental prerendering with
<div hidden />is disabled in favor of a different future API.React DOM no longer pools events.
A component passed to
forwardRefthat returnsundefinednow throws.A component passed to
memothat returnsundefinednow throws.Uses the browser's
focusoutevent.React no longer emulates bubbling for the scroll event.
Removed the
timeoutMsargument from the experimental Concurrent Mode API.Experimental APIs gain the
unstable_prefix.Removed this experimental Concurrent Mode API.
Cleanup functions run asynchronously, and all effects are cleaned up before any next effects run.
Deprecations 1
The undocumented and misleading API is deprecated.
New APIs and options 9
Keyboard event objects now include a
codeproperty.Added the
disableRemotePlaybackproperty for video elements.Context now allows a
displayNameto improve component stacks.Added the
enterKeyHintproperty for input elements.Added the development runtime entry point for the new JSX transform.
Added the runtime entry point for the new JSX transform.
Added an experimental Suspense option for CPU-bound trees.
Added an experimental transition API.
Added an experimental Hook.
Performance 1
Remains passive.
Behavior and default changes 9
Warns when no
valueis provided to a context provider.React attaches event handlers to the root DOM container instead of document, fixing reported integration problems with non-React code and enabling gradual upgrades.
Uses the browser's
focusinevent.Reset events now use delegation.
Submit events now use delegation.
Remains passive.
Can now be called during lifecycle methods, though React warns when it is used there.
Strict Mode double-renders components without Hooks too.
All effects are cleaned up before any next effects run.
Fixes and other changes 1
The server renderer's behavior is now consistent with
useMemo.