title: Change the root view of UIHostingController in SwiftUI
body: <p>For a new <code>SwiftUI</code> iOS app, I do the following in the <code>SceneDelegate</code></p>
  
  <pre><code>if let windowScene = scene as? UIWindowScene {
      let window = UIWindow(windowScene: windowScene)
      if Auth().token == nil {
          window.rootViewController = UIHostingController(rootView: StartRegistrationView())
      } else {
          window.rootViewController = UIHostingController(rootView: MainTabbedView())
      }
      self.window = window
      window.makeKeyAndVisible()
  }
  </code></pre>
  
  <p>When a user hasn't signed up or logged in they are taken to the registration flow.</p>
  
  <p>Once a user has signed up, how can I switch the RootView to go to my TabView? I can't seem to find any solution using <code>SwiftUI</code>. </p>
  
  <p>Should I instead use an <code>Environment</code> object and listen for changes to the User's <code>Auth</code> Status?</p>