I have following View Structure e.g.: Root View -> Detail View -> Edit View -> Detail Edit View
So the user can use a NavigationLink with (value: ...)
to get to the next view.
How do I pass a Binding from Edit View to Detail Edit View? With the old NavigationView & -Link there wasn't a problem but now the Root View uses .navigationDestination
to call each View an here of course I don't have access to the @State
s from Edit View.
My current workaround:
I'm creating a ObservableObject
with a singleton and pass the @State
from Edit View on init()
call. From there on I'm working with the ObservableObject
attribute (in Edit View & Detail Edit View)