title: Conditionally use view in SwiftUI
body: <p>I'm trying to figure out the correct way to conditionally include a view with swiftui. I wasn't able to use the <code>if</code> directly inside of a view and had to use a
  stack view to do it.</p>
  
  <p>This works but there seems like there would be a cleaner way.</p>
  
  <pre class="lang-swift prettyprint-override"><code>var body: some View {
      HStack() {
          if keychain.get("api-key") != nil {
              TabView()
          } else {
              LoginView()
          }
      }
  }
  </code></pre>