npm / preact
preact
What changed in preact 10 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
18 breaking2 security13 new APIs and options7 performance14 behavior and defaults44 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpreact 1162 changes
Breaking changes 16
Non-function values for on* props are ignored instead of being registered as invalid event handlers.
When using this package, the new VNode marker requires version 6.8.2 or later.
When using this package, the new VNode marker requires version 2.11.4 or later.
Corrects nullability and removes createRef's default any type.
Component.base was removed; the notes point to this.__v.__e as an alternative for accessing the DOM node.
defaultProps support moved from core into preact/compat.
Core and add-on bundles are distributed exclusively as ES modules with the .mjs extension; .module.js, CommonJS and UMD bundles have been removed.
The JSX namespace now contains only TypeScript-required types; other types move to the preact namespace.
The optional third replaceNode parameter was removed; the preact-root-fragment package provides a standalone Preact 10-compatible alternative.
Automatic px suffixing for numeric style values moved from core into preact/compat; core no longer adds px automatically.
Preact 11 supports Chrome 71+, Safari 12.1+, Firefox 69+ and Edge 79+ without polyfills; older browsers require polyfills.
SuspenseList and its server-side support were removed from preact/compat.
Types are stricter and exported from a better location, so applications may need type-related migration changes.
The minimum supported TypeScript version is 5.1.
Unmount cleanup functions are deferred until after the browser has painted; useLayoutEffect remains the option when cleanup must occur synchronously before DOM mutations are committed.
The useRef type signature now requires an initial value.
Security 1
VNode recognition is hardened with a shared symbol marker.
New APIs and options 10
Adds a compiler runtime for apps compiled with React Compiler.
Preact 11 adds automatic ref forwarding.
preact/debug exports captureOwnerStack() for improved debugging and integration with developer tooling.
preact/compat supports the optional context argument for Children.forEach().
preact/compat supports the optional context argument for Children.map().
Preact 11 introduces Hydration 2.0.
preact/debug exports setupComponentStack() for improved debugging and integration with developer tooling.
preact/compat adds use() for reading Promises and Context.
preact/compat adds useEffectEvent().
preact/compat supports the optional getServerSnapshot argument.
Performance 1
Bundle size is reduced across core, hooks, and compat.
Behavior and default changes 10
Rendering into shadow roots now supports scoped custom element registries.
Adds declarative shadow DOM attributes to template elements, including their camelCase forms.
Accessible element attribute types become the default.
Errors that no boundary handles now log the component stack.
Event listeners are keyed by prop name and have attach times stamped per listener.
Ref cleanups stay on the element instead of the ref function.
createPortal is available directly from preact, so portals can be used without preact/compat; the compat export remains available.
The imageRendering property is mapped to the image-rendering CSS property.
Hook arguments use Object.is equality checks.
Top-level Fragments no longer use cloneNode.
Fixes and other changes 24
Thrown null or undefined values reach error boundaries without being replaced with a TypeError.
Event handlers on unmounted nodes are preserved so events already bubbling can finish.
Fixes rendering, updating, and hydrating template elements in SVG and MathML namespaces.
Errors are isolated to the throwing component, allowing unrelated effects and lifecycle callbacks to still run.
The
listattribute is allowed on all valid input types.Compat no longer appends
pxto unitless SVG paint and aspect-ratio values.Queued components keep updating and act() cleanup finishes after an uncaught render error.
Deferred hydration ranges are retained through suspension, resumption, and unmounting.
Improves accessibility discriminated unions for dynamic input and select props.
Corrects the browser ESM entry point for this compat server subpath.
Compat leaves non-plain style objects untouched, preserving string-valued signal styles.
Prevents duplicate DOM after an uncaught render error.
Parked Suspense children are unmounted when their boundary unmounts.
Types for preact/compat/scheduler are fixed.
Types for preact/compat/server are fixed.
Suspended hydration stays within a component's own $s range.
CamelCase custom event names retain their casing.
Insertion appends when the reference node lives in another container.
Containers without an ownerDocument use the global document.
Availability is checked on the container rather than globally.
DOM nesting validation now stops at portal boundaries.
Refs are re-attached when a suspended subtree reveals.
RefObject<T> now describes a ref whose current value is T; include null in the type argument when appropriate.
Resuming into the DOM kept while a component was suspended is fixed.
preact 1036 changes
Breaking changes 2
Updates in flushSync are batched.
Reverts the fix for useId stability across async Suspense.
Security 1
Preact has JSON VNode Injection issue
New APIs and options 3
Implemented flushSync.
Adds a commpat/server.browser entry for projects that need that entry point.
Adds type support for snap events.
Performance 6
Avoids redundant allocations and writes.
Optimizes compat size.
Optimizes core size.
Optimizes hooks size.
Makes oldProps diffing more compact.
Backports optimizations from v11.
Behavior and default changes 4
RTS is now an optional peer dependency, so installing it is no longer required.
The input DOM type now accepts Signalish.
Each Preact instance on a page now gets a unique event clock.
Supports inheriting namespace through portals.
Fixes and other changes 20
Reverted a change that was incompatible with useSignalEffect.
Fixes recovery of children during Compat Suspense hydration.
Fixes a crash in hydration-suspense caused by an sCU bail.
Fixes error recovery for partially rendered subtrees.
Fixes hydrate recovery when excess DOM children are null.
Addresses and guards memory leak hotspots.
Flushes subtree effects when rendering a pending node.
Fixes useId stability across async Suspense.
Fixes hydration when a textarea has defaultValue or value.
Fixes incorrect DOM order with conditional ContextProvider and inner keys.
Fixes a crash when a synchronous effect render unmounts the tree.
Resolves some suspense crashes.
Avoids scheduling suspense state updates.
Enforces strict equality for VNode object constructors.
Fixes erroneous diffing with a growing list.
Updates the type so future TypeScript versions accept Trusted… values.
Prevents lazy components without a result from entering a throw loop.
Fixes the types for scroll events.
Fixes cascading renders when using signals.
VNode object constructors now use strict equality.