preact
11.2.0 · 6 Nov 2026MIT63.1M / weekRepositoryHomepagenpmAtom feed
10.29.8 is the newest release of 10.x.
In short
3 new4 fixed2 internal
Release note
Features
Support ref cleanup functions (#4436, thanks @marvinhagemeister)
This adds support for returning a function in functional refs, example
<input
ref={(ref) => {
// Assign ref, do something with it
return () => {
// ref cleanup, when the element unmounts
// we run the cleanup
};
}}
/>Fixes
Child-diffing should shift keyed fragmented lists (#4448, thanks @JoviDeCroock)
Invalid DOM check not firing when p/a/button have a parent (#4449, thanks @JoviDeCroock)
Support comments for streaming renders (#4446, thanks @JoviDeCroock)
Import renderToPipeableStream in server.mjs for re-exporting (#4440, thanks @3846masa)
Types
Add missing types ElementType and ComponentPropsWithoutRef (#4433, thanks @hamza0867)
Add html attributes types #4099 (#4100, thanks @samsam-ahmadi)
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.