Skip to content

iAPI: Merge of state and context after client-side navigation #63864

@luisherranz

Description

@luisherranz

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

  1. Create a block that uses global state.
  2. Place that block outside of a router region.
  3. Navigate to a page where the global state is different from the initial page.
  4. 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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions