tl;dr: This is release contains mostly bug fixes and some size reductions. We encourage everyone to upgrade.
Just a week has passed since the last release and there are already an exciting number of new commits in master. Hackoktoberfest has had really positive effects on us and we're excited to see some new contributors in this release 💯
As you can see from the changelog: @andrewiggins is currently on a byte removing spree, so I thought it'd be appropriate to list them in their own category 🎉 A few others joined him and marie kondo'ed everything that didn't spark joy in us!
Besides some great savings, there are new debug warnings for components and fixes for our Suspense implementation 🎉
Features
- Add debug warnings when calling
setState
orforceUpdate
on an unmounted component (#2037, thanks @andrewiggins)
Bug Fixes
- Support re-suspending with
<Suspense>
(#2025, thanks @andrewiggins) - Add unpkg aliases (#2032, thanks @developit)
- Fix
ref
not always called inuseImperativeHandle
(#2021, thanks @JoviDeCroock)
Golf (size reductions)
- Inline
coerceToVNode
inside oftoChildArray
(-21 B) (#2040, thanks @andrewiggins) - Remove unused mount check in context Provider (-6 B) (#2039, thanks @andrewiggins)
- Golfed render (#2045, thanks @MohammedSheikhIbrahim)
- Remove useless return from eventProxy (#2026, thanks @jridgewell)
- Rewrite
useImperativeHandle
to useuseLayoutEffect
(-35 B) (#2003, thanks @andrewiggins) - Re-purpose
renderCallbacks
as a general per-component commit queue (#2011, thanks @andrewiggins)
Types
- Add
nonce
to JSXHTMLAttributes
types for better Content Security Policy support. (#2035, thanks @calvinf) - Remove internal import from compat types (#2018, thanks @andrewiggins)
- Fix internal
vnode
typings (#2015, thanks @pmkroeker)
Maintenance
- Remove end of line in
compat/mangle.json
(#2053, thanks @38elements) - Add
_afterPaintQueued
and_fallback
tomangle.json
(#2043, thanks @38elements) - Remove OpenCollective postinstall Banner (#2033, thanks @developit)
- Update
preact/compat
in readme (#2029, thanks @developit) - Fixed some typos and grammatical mistakes. (#2028, thanks @MohammedSheikhIbrahim)
- Add
_force
and_lastDomChild
tomangle.json
(#2023, thanks @developit) - Add
_suspensions
to mangle (#2019, thanks @JoviDeCroock) - Add npm script to run compat TS tests (#2017, thanks @andrewiggins)