
"Preact 11 Beta brings changes across three key areas: hydration, performance, and ecosystem alignment. The new Hydration 2.0 model allows components that suspend during hydration to return zero or multiple DOM nodes, a departure from the previous restriction of one node per async boundary. This enables more complex hydration scenarios and better aligns Preact with modern rendering patterns. Another headline feature is default ref forwarding. Functional components can now receive ref props without requiring forwardRef, reducing boilerplate and improving compatibility with React libraries."
"To streamline distribution and align with modern module conventions, all ESM bundles now ship as .mjs files, replacing the older .module.js format. CommonJS and UMD bundles remain available. Alongside this, several long-standing legacy features have been removed, including automatic CSS px suffixing and defaultProps being moved into preact/compat, plus the complete removal of component.base, SuspenseList, and replaceNode. Preact 11 also raises its baseline requirements by dropping Internet Explorer 11 support and requiring TypeScript 5.1 or newer."
Preact 11 Beta updates hydration, performance, and ecosystem alignment. Hydration 2.0 allows components that suspend during hydration to return zero or multiple DOM nodes instead of one per async boundary, enabling more complex hydration scenarios. Functional components now accept ref props by default without forwardRef, reducing boilerplate and improving compatibility with React libraries. Hook dependencies use Object.is for equality checks, resolving edge cases like NaN comparisons in useEffect and useState. All ESM bundles now ship as .mjs files while CommonJS and UMD remain available. Several legacy features were removed and baseline support dropped for Internet Explorer 11; TypeScript 5.1 is required. A migration guide documents breaking changes and workarounds.
Read at InfoQ
Unable to calculate read time
Collection
[
|
...
]