Skip to content

Deferred properties are refetched when navigating between pages and using persistent layouts #2354

@pablor21

Description

@pablor21

Versions:

  • @inertiajs/core version: 2.0.11
  • @inertiajs/svelte version: 2.0.11

Describe the problem:

When using persisting layouts the deferred properties are refetched, even when they are only used in the layout itself and they are not referenced in the page component.

Steps to reproduce:

  1. Create a deferred shared property in laravel's middleware
  2. Reference it in the app layout (svelte in this case), do not reference in any page
  3. Navigate between pages
  4. The property is refetched (a new http request is made for each navigation)

Expected behavior:

The deferred properties that are only referenced in persistent layouts should not be refetched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions