Update dependency preact to v10.4.0 #698
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
10.3.4
->10.4.0
Release Notes
preactjs/preact
v10.4.0
Compare Source
tl;dr: This release contains some very amazing improvements to hydration and to performance when memoized
vnodes
are used. We recommend everyone to upgrade 🎉We understand that the past weeks have been very strange for everybody across the world. We've spent that last weeks mainly focusing on making sure our families and loved ones are safe and taken care of. Whether you're using Preact at work or in a sideproject we hope that this release brings you a little bit of joy and makes your day a little bit brighter 🌠
Strictly equal
vnodes
bail out of renderWhen an
vnode
is equal to the one from the last render we will successfully bail out of rendering. This is a performance optimization many state libraries frequently make use of. The most well known of those is probablyreact-redux
. We've wanted to add this for the initial Preact X release but had to postpone due to not having found the proper solution back then. In the following months we've passed around various ideas on how to best solve this and it wasn't until last month when it finally clicked and the pieces fell together. @JoviDeCroock had a prototype up running in a few days and has spent a lot of time into making sure that this performance optimization works in all scenarios. We can't stress enough how much of an accomplishment this is. This is really amazing work by @JoviDeCroock and we're over the moon that it has finally landed in Preact 🎉hydrate falls back to render for new subtrees
When doing SSR there are cases where the DOM tree and the
vnodes
don't match. This can lead to a lot of problems, but for now we handle situations a bit more gracefully when there is no existing DOM node present. If we encounter that, we just opt out of hydration for that tree and revert back to doing a full diff. In the future we plan to add more warnings topreact/debug
for that.Features
vnodes
(#2386, thanks @JoviDeCroock)hydration
(#2438, thanks @JoviDeCroock)Bug Fixes
setProperty
for known bypass cases (key, children) (#2213, thanks @developit)act
callback (#2433, thanks @robertknight)ref
is mutable even if a DOM node is inserted into it (#2422, thanks @JoviDeCroock)defaultValue
(#2420, thanks @JoviDeCroock)Typings
act
type signature (#2444, thanks @ddayguerrero)_patchedLifecycles
tocompat/src/internal.d.ts
(#2408, thanks @38elements)Maintenance
typeof
(#2409, thanks @polemius)Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.