-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lit] Fix hydration not having the same reactive values as server #6080
Conversation
🦋 Changeset detectedLatest commit: f3530b2 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b760e74
to
70e8f45
Compare
const isReactiveProperty = name in Ctr.prototype; | ||
const isReflectedReactiveProperty = Ctr.elementProperties.get(name)?.reflect; | ||
|
||
// Only defer hydration if we are setting a reactive property that cannot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love these comments
|
||
// Only defer hydration if we are setting a reactive property that cannot | ||
// be reflected / serialized as a property. | ||
shouldDeferHydration ||= isReactiveProperty && !isReflectedReactiveProperty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might be the first to add logical or assignments to our codebase.
fixes #5777
Changes
clientEntrypoint
to Lit that sets props on the clientdefer-hydration
attribute to defer hydration until we have set props on clientTesting
Changed the props to be different from default value in the e2e test
Docs
This is a bugfix. Makes Lit integration work as intended.