Hi, I'm trying to play with new SwiftUI, by trying to create a simple app. But I'm stuck a bit.
My task is to create two screens: the login and dashboard screen.
I've started with creating a single view app using SwiftUI, then created a view for the login screen, all fine.
Now I need to close this view and open another.
Before SwiftUI it was simple, I would do it with two storyboards one for the login screen, the second one for the dashboard and other navigation chains. Once the backend succeeded with login, I would change the storyboard with the dashboard one. On logout, back to the login storyboard.
Now, using the SwiftUI I need to do the same.
Currently, the only feasible way is to create the same two storyboards, then create UIHostingViewController for each view and so on.
Is that the way it should work, or I've missed something? Should it also work without Viewcontrollers and Storyboards?
Thanks in advance.