Skip to content

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

@felixarntz

Description

@felixarntz

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions