Releases: preactjs/preact
Releases · preactjs/preact
10.11.3
Bug Fixes
- Add an explicit
default
export for compatibility with esbuild (#3783, thanks @Verseth) - Fix
useId
uniqueness with shared parents + DOM nodes in between (#3773, thanks @marvinhagemeister) - Fix case where keyed children would get removed (#3779, thanks @JoviDeCroock)
- Use
Object.is
in useSyncExternalStore (#3776, thanks @zalishchuk)
Maintenance
- Consolidate benchmark workflow steps into a single reusable workflow (#3782, thanks @andrewiggins)
- Upgrade bench dependencies (#3778, thanks @andrewiggins)
- Upgrade workflow actions (#3777, thanks @andrewiggins)
10.11.2
Bug Fixes
- Fix
setState
order (#3763, thanks @JoviDeCroock) - Fix duplicate ids with
useId
when Fragments are involved (#3758, thanks @marvinhagemeister)
Types
- Fix props not spreadable to
<input>
elements (#3764, thanks @mwszekely)
10.11.1
Bug Fixes
- Fix webpack error when trying to import
compat/package.json
(#3755, thanks @akselander) - Fix nested fragments swapped incorrectly on conditional swap (#3738, thanks @JoviDeCroock)
- Avoid synchronously adding setState callbacks (#3743, thanks @JoviDeCroock)
- Fix signals not supported in HTML + SVG TypeScript definitions (#3747, thanks @marvinhagemeister)
- Only remove nested DOM elements on unmount when necessary (#3741, thanks @developit)
- Don't discard prop updates when nested state update is immediately cancelled (#3739, thanks @JoviDeCroock)
- Align TypeScript definitions from react to refs and forward refs (#3713, thanks @PodaruDragos)
- Add missing
"types"
field forpreact/debug
(#3732, thanks @marvinhagemeister) - Fix falsy data attributes not working (#3720, thanks @JoviDeCroock)
- Ensure
_mask
property always has the same name in distributed version (#3721, thanks @JoviDeCroock)
10.11.0
10.11.0
New Hook: useId
Today we are announcing a new hook: useId
. This hook creates stable unique identifiers that are consistent between server-side rendering (using preact-render-to-string) and client-side hydration. The useId()
hook is primarily useful for generating identifiers for attributes like aria-labelledby
and <label for="...">
.
To enable useId()
to generate consistent unique identifiers, please ensure you are using preact-render-to-string version 5.2.4 or newer for server-side rendering.
(#3583, thanks @JoviDeCroock)
Fixes
- Fix memory leak by cleaning up
_parent
,_dom
and__hooks
after unmount (#3709, thanks @JoviDeCroock) - Fix case where the
ref
property could be omitted from reused VNodes (#3696, thanks @JoviDeCroock) - Pass
errorInfo
touseErrorBoundary
callback (#3689, thanks @marvinhagemeister) - Fix typescript definition for
class | className
(#3711, thanks @PodaruDragos)
Maintenance
- Fix the mac arm build (#3697, thanks @gengjiawen)
- Fix published JS formats after #3697 (#3702, thanks @rschristian)
- Add todo benchmark and add a proxy package that uses preact/hooks (#3708, thanks @JoviDeCroock)
- Add deprecation notice to
render()
'sreplaceNode
argument (#3700, thanks @rschristian) - Improve types for bare
createElement()
andh()
calls (#3690, thanks @JoviDeCroock) - Add test for useId (#3716, thanks @JoviDeCroock)
10.10.6
types
- allow for null return from fc (#3683, thanks @JoviDeCroock)
10.10.5
fixes
- undo jsx-element removal (#3680, thanks @JoviDeCroock)
10.10.4
Fixes
- allow function component with children (#3676, thanks @JoviDeCroock)
- ensure we iterate over all hooks (#3675, thanks @JoviDeCroock)
10.10.3
Fixes
- fix hooks calling shouldComponentUpdate without context (#3671, thanks @developit)
- fix case where we set SCU multiple times (#3670, thanks @JoviDeCroock)
- fix sync-external-store with zustand (#3663, thanks @JoviDeCroock)
10.10.2
Fixes
- fix
useSyncExternalStore
relying on changed render values (#3655, thanks @JoviDeCroock) - avoid crashing due to __hooks being null (#3651, thanks @JoviDeCroock)
10.10.1
Bug Fixes
- Fix infinite loop in
radix-ui
which enqueues multiple state updates in the same tick (#3645, thanks @JoviDeCroock ) - Fix effects run for suspended components in rare instances (#3643, thanks @JoviDeCroock )
- Fix
useSyncExternalStore
not working with function values (#3633, thanks @marvinhagemeister ) - Defer bailing out of updates to the render phase to align with React (#3621 + #3623, thanks @JoviDeCroock )
- Fix some SVG attributes applied with wrong casing (#3615, thanks @iminside)
Maintenance
- Update
esbuild
(#3630, thanks @marvinhagemeister ) - Make demo compatible with node 16 and 18 (#3617, @gengjiawen )