-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Interactivity API: Update data-wp-bind
directive logic
#54003
Interactivity API: Update data-wp-bind
directive logic
#54003
Conversation
Size Change: +61 B (0%) Total Size: 1.51 MB
ℹ️ View Unchanged
|
data-wp-bind
directive logic
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've tested it and data-wp-bind
seems to be working as previously 👍
This should be done in a separate PR.
e06b9d8
to
23489d5
Compare
Great work. I didn't know that |
By the way, @DAreRodz, this should have been an "Enhancement", not a feature 🙂 |
Oops, my fault. 🙈 It was fine in the |
What?
Update the logic of
data-wp-bind
to match Preact's logic during hydration.Why?
Required by #53737, see #53737 (comment))
How?
We copied Preact's code (link) into the
useEffect
hook used to initialize bound values and added e2e tests to cover several representative cases.Note that, most of the time, Preact modifies the
HTMLElement
instance properties instead of the attributes, so the final values vary depending on the modified property. In some cases, attributes may not even change at all.Testing Instructions
E2E tests should pass.