Skip to content
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

Yield to main before every Interactivity API store action, unless it uses withEvent() #64946

Open
felixarntz opened this issue Aug 30, 2024 · 0 comments
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. [Packages] Interactivity /packages/interactivity [Type] Enhancement A suggestion for improvement. [Type] Performance Related to performance efforts

Comments

@felixarntz
Copy link
Member

felixarntz commented Aug 30, 2024

This is a follow-up issue to #64944. Please see that issue for additional context.

This issue is about implementing step 2. from the overall plan outlined in #64944 (and potentially part of step 3. as well): All store actions should be yielded to the main thread, unless they use withEvent. At this point, data-wp-on-async should effectively be treated the same as data-wp-on, ignoring the difference between the directives, and data-wp-on-async should be discouraged as it no longer provides any value.

Since this is a breaking change, this must not happen until at least one release cycle after #64944 was launched in WordPress Core. We need to keep an eye out on ecosystem adoption of withEvent as well, before being able to confidently make this change.

@felixarntz felixarntz added [Type] Enhancement A suggestion for improvement. [Type] Performance Related to performance efforts [Feature] Interactivity API API to add frontend interactivity to blocks. [Packages] Interactivity /packages/interactivity labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. [Packages] Interactivity /packages/interactivity [Type] Enhancement A suggestion for improvement. [Type] Performance Related to performance efforts
Projects
None yet
Development

No branches or pull requests

1 participant