🎉 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.0
at the same time. Since Preact 5+ now includes built-in support for SVG,preact-compat@2
drops thepreact-svg
dependency, saving you around1.7kb
.
Along with the lovely stable
stamp, this release includes some finishing touches:
Bug Fixes
- Fix case where a
ref
may 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