A bit quicker than usual, but we felt like the recent changes are worthy enough to be part of a dedicated release. Originally we planned to just include a fix for our prop-types
validation in debug and when looking at our open PRs we couldn't resist to add those that were already done.
The awesome release name is brought to you by @jviide 😎
Ghosting DOM elements 👻
When setState/forceUpdate
was called in a lifecycle other than componentDidUpdate
we sometimes didn't clean up the previous DOM correctly. This lead to ghosting effects and was the last fix needed to get our new people demo fully working (it uses mobx
and mobx-state-tree
). We're happy to see this is resolved 👍
JSX Typings 💯
One of the PRs we are really excited about was made by @just-boris: He moved our JSX types under a dedicated preact
namespaces allowing our types and @types/react
to coexists without any conflicts. This is big for anyone using TS and we can't thank him enough for his PR 🎉
Streamlined useEffect
🔢
We reworked our cleanup code for effects with this release. Before new effects are executed we cleanup all previous ones instead of cleaning and executing them one-by-one. This was confusing and the new behavior is much more obvious when writing effectful code.
Community
As with our last releases we received numerous amazing reproductions and issues which allowed us to quickly spot a bug and fix it. We really appreciate the short feedback loop. Without it we wouldn't be able to improve Preact X as much as we can 👍
Features:
- warn about deprecated properties (#1511, thanks @JoviDeCroock)
Bug fixes:
- effect execution and cleanup order (#1501, thanks @JoviDeCroock)
_dom
beingnull
whenever sCU returnsfalse
(#1484, thanks @marvinhagemeister)- debug message should not throw for
undefined
andnull
(#1505, thanks @JoviDeCroock) - Remove unused component import (#1508, thanks @marvinhagemeister)
Typings:
- move JSX namespace into preact one (#1448, thanks @just-boris)