Closed
Description
This might be due to my limited knowledge of SwiftUI or a flaw in my app. However, it happens that NavigationStackView
is re-initialized for rerendering and because navViewModel
is created in the constructor, it forgets its state.
Marking it is a @StateObject
fixes the problem for me, but this method is only available starting iOS 14, so I'm not sure if that's what you want for this library.
And as I mentioned, perhaps NavigationStackView
shouldn't be reinitialized at all, but that seems to be a problem with either SwiftUI or my app.
Metadata
Metadata
Assignees
Labels
No labels