Hi,
I need logic like this, using SwiftUI:
if userHasAccount {
showDashboardView()
}
else {
showSignupView() // blocks progress until complete
showDashboardView()
}
I'm unsure where/how the best place and approach for this is.
My instincts say that the scene() method in SceneDelegate would be the place to conditionally alter the rootView. But then how do I, on signup completion, disgard the signup root view and transition to the dashboard view?
I've read quite a few approaches to conditional views implement AnyView casting or using Group, within the default contentView. This seems a little bit of a hack?
thanks,