preact
11.2.0 · 6 Nov 2026MIT63.1M / weekRepositoryHomepagenpmAtom feed
10.29.8 is the newest release of 10.x.
In short
4 fixed5 internal
Release note
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,_domand__hooksafter unmount (#3709, thanks @JoviDeCroock)Fix case where the
refproperty could be omitted from reused VNodes (#3696, thanks @JoviDeCroock)Pass
errorInfotouseErrorBoundarycallback (#3689, thanks @marvinhagemeister)Fix typescript definition for
class | className(#3711, thanks @PodaruDragos)
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.