Skip to content

Unexpected view recomputation across tabs when presenting a view in FlowStack #111

@yelmouden

Description

@yelmouden

I'm using multiple FlowStack instances inside a TabView, each one with its own FlowPathNavigator.
I noticed an unexpected behavior that only happens when using a FlowPathNavigator :

➡️ When I present a sheet with navigator.presentSheet(...) inside one tab, the views in other tabs are recomputed, even though they do not interact with that navigator at all.

This can be reproduced directly in your example app.

Open the FlowPathView example from the repo.

In the nested HomeView, add Self._printChanges() at the beginning of body to track when the view is recomputed:

Image

You will see that presenting the sheet causes HomeView.body to be recomputed when I present a sheet from view model tab for example

When I use a similar setup inside my own app, with multiple FlowStack instances inside a TabView and each using a FlowPathNavigator, this recomputation also happens in the views of other tabs when I present a sheet in just one tab. This is the cross-tab invalidation behavior I’m describing in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions