preact v10.0.0-alpha.4 Release Notes
Release Date: 2019-04-05 // about 5 years ago-
๐ 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 thancomponentDidUpdate
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 usesmobx
andmobx-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)