-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Packages] Interactivity/packages/interactivity/packages/interactivity[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
There's no way to distinguish the global state belonging to blocks that are inside a router region from the global state belonging to blocks that are not inside a router region. Therefore, we can't use the strategy of replacing the client state with the state coming from the server during client-side navigations.
Step-by-step reproduction instructions
- Create a block that uses global state.
- Place that block outside of a router region.
- Navigate to a page where the global state is different from the initial page.
- The state of the block was updated, which it shouldn't have, since it's outside a router region.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Metadata
Metadata
Assignees
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Packages] Interactivity/packages/interactivity/packages/interactivity[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended