preact
11.2.0 · 6 Nov 2026MIT63.2M / weekRepositoryHomepagenpmAtom feed
5.7.0 is the newest release of 5.x.
In short
1 new2 fixed
Release note
Preact 5 is here!
Version 5 represents a fairly major jump forward. It should be backwards-compatible, but major version increment is to signify a few new features that will not be made available in older versions - mainly built-in SVG support, and async rendering.
Take a few seconds and upgrade, you'll be happy you did! 🌈
Tip: If you're using preact-compat, it's best to upgrade that to
2.0.0at the same time. Since Preact 5+ now includes built-in support for SVG,preact-compat@2drops thepreact-svgdependency, saving you around1.7kb.
Along with the lovely stable stamp, this release includes some finishing touches:
Bug Fixes
Fix case where a
refmay be nulled before a component is unmounted (#232, thanks @slmgc!)Ensure remounting component trees invokes mount lifecycle events for deeply nested children (thanks to @kruczy @madumo et al for their help with this!)
New Features
Style objects now have a lightning fast pipeline out to the DOM. (#228, thanks @trashhalo!)
Example:
<div style={{ foo:'bar '}} />now diffs against the current style rather than stringifying the object
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.