You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves#158.
Fixes a bug where `NavigationView` destination was reset after scene phase changes (or any re-renders caused by environment changes for that matter).
This was caused by `@ObservedObject` destination being recreated, now `@StateObject` persists it across re-renders.
The `setter` property of the `ValueStorage` protocol is now moved to a separate `WritableValueStorage` protocol. The reasoning is that `StateObject` doesn't need its wrapped value to be set directly as it operates on it by reference, not by value, thus `StateObject` doesn't need any wrapped value setters.
Interesting gotcha described here: https://www.mattmoriarity.com/2020-07-03-stateobject-and-observableobject-in-swiftui/
The text was updated successfully, but these errors were encountered: