title: SwiftUI 4: NavigationSplitView behaves strangely?
body: <p>In SwiftUI 4, there is now a <code>NavigationSplitView</code>. I played around with it and detected some strange behaviour.</p>
  <p>Consider the following code: When the <code>content</code> function returns the plain <code>Text</code>, then there is the expected behaviour - tapping a menu item changes the detail view to the related text.</p>
  <p>However, when commenting out the first four <code>case</code>s, and commenting in the next four, then a tap on &quot;Edit Profile&quot; does not change the detail view display. (Using <code>@ViewBuilder</code> does not change this behaviour.)</p>
  <p>Any ideas out there about the reasons for that? From my point of view, this may just be a simple bug, but perhaps there are things to be considered that are not documented yet?!</p>
  <pre><code>struct MainScreen: View {
      
      @State private var menuItems = MenuItem.menuItems
      @State private var menuItemSelection: MenuItem?
      
      var body: some View {
  
                  NavigationSplitView {
  
                      List(menuItems, selection: $menuItemSelection) { course in
  
                          Text(course.name).tag(course)
                      }
                      .navigationTitle(&quot;HappyFreelancer&quot;)
                  } detail: {
  
                      content(menuItemSelection)
                  }
                  .navigationSplitViewStyle(.balanced)
      }
      
      func content(_ selection: MenuItem?) -&gt; some View {
  
          switch selection {
  
              case .editProfile:
                  return Text(&quot;Edit Profile&quot;)
  
              case .evaluateProfile:
                  return Text(&quot;Evaluate Profile&quot;)
  
              case .setupApplication:
                  return Text(&quot;Setup Application&quot;)
  
              case .none:
                  return Text(&quot;none&quot;)
  
  //          case .editProfile:
  //              return AnyView(EditProfileScreen())
  //
  //          case .evaluateProfile:
  //              return AnyView(Text(&quot;Evaluate Profile&quot;))
  //
  //          case .setupApplication:
  //              return AnyView(Text(&quot;Setup Application&quot;))
  //
  //          case .none:
  //              return AnyView(Text(&quot;none&quot;))
          }
      }
  }
  
  struct MainScreen_Previews: PreviewProvider {
      
      static var previews: some View {
  
          MainScreen()
      }
  }
  
  enum MenuItem: Int, Identifiable, Hashable, CaseIterable {
      var id: Int { rawValue }
  
      case editProfile
      case evaluateProfile
      case setupApplication
  
      var name: String {
          switch self {
              case .editProfile: return &quot;Edit Profile&quot;
              case .evaluateProfile: return &quot;Evaluate Profile&quot;
              case .setupApplication: return &quot;Setup Application&quot;
          }
      }
  }
  
  extension MenuItem {
  
      static var menuItems: [MenuItem] {
          MenuItem.allCases
      }
  }
  
  struct EditProfileScreen: View {
      var body: some View {
          Text(&quot;Edit Profile&quot;)
      }
  }
  
  </code></pre>