title: TabView Going Back to First Page When Updated
body: <p>I have a view within a tab view (it's the second tab on the list) that shows one of three conditional views dependent on a couple variables in the ViewModel for this view.</p>
  <p>The first view is a user selection (<code>ChooseSeasonLength()</code>), and when that gets selected, it's supposed to show a loading screen (<code>LoadingScreen()</code>) until a featuredSeason gets set, at which point it is supposed to show the main view (<code>SeasonPage()</code>):</p>
  <pre><code>struct SeasonView: View {
      
      @EnvironmentObject var currentUser: CurrentUserProfile
      @ObservedObject var seasonGoalsVM: SeasonGoalsViewModel
      
      var body: some View {
          if seasonGoalsVM.featuredSeason != nil {
              SeasonPage()
                  .environmentObject(seasonGoalsVM)
          } else if seasonGoalsVM.seasonLength == nil {
              ChooseSeasonLength()
                  .environmentObject(seasonGoalsVM)
          } else {
              LoadingScreen()
                  .environmentObject(seasonGoalsVM)
          }
      }
  }
  </code></pre>
  <p>But the issue I'm having is that this <code>SeasonView()</code> is the second item in the TabView list, and whenever I click the user selection, instead of showing the loading screen, it pops me back to the first tab - the <code>HomePage()</code>.</p>
  <p>When I click back on the SeasonView in the tab list, it takes me to the right screen, but I don't know why the initial user selection on SeasonView takes me back to the HomePage instead of taking me through the correct flow of views within the SeasonView.</p>
  <p>I've read that TabView might have some issues, but haven't seen anything about this. Does anyone know if this is possibly an issue with TabView?</p>
  <p>Here is my initial view, with the tabs specified in it:</p>
  <pre><code>struct HomeView: View {
      @StateObject var actionListVM = ActionListViewModel()
      @StateObject var seasonGoalsVM = SeasonGoalsViewModel()
      
      var body: some View {
          TabView {
              HomePage(actionListVM: actionListVM)
                  .tabItem {
                      Label(&quot;Home&quot;, systemImage: &quot;house.fill&quot;)
                  }
              SeasonView(seasonGoalsVM: seasonGoalsVM)
                  .tabItem {
                      Label(&quot;Season&quot;, systemImage: &quot;scribble.variable&quot;)
                  }
              GroupsPage()
                  .tabItem {
                      Label(&quot;Groups&quot;, systemImage: &quot;person.2.fill&quot;)
                  }
              FriendsPage()
                  .tabItem {
                      Label(&quot;Friends&quot;, systemImage: &quot;person.crop.circle.badge.plus&quot;)
                  }
          }
      }
  }
  </code></pre>