title: How to dismiss a presenting view to the root view of tab view in SwiftUI?
body: <p>I'm using <code>TabView</code> on my home page. Let's just say I have 4 tabs.
  On second tab, i can go to another view using <code>NavigationLink</code> and I go to another 2 views using <code>NavigationLink</code>. Then on the latest view, there is a button to present a view and i use <code>.fullScreenCover</code> (since I want to present it full screen).</p>
  <p>In the presenting view, I add an <code>X</code> mark on the left side of the <code>navigationBarItems</code> to dismiss. I use <code>@Environment(\.presentationMode) var presentationMode</code> and <code>presentationMode.wrappedValue.dismiss()</code> to dismiss. But it only dismiss the presenting view to the previous view, while actually I want to dismiss it to the root of my view which is the 2nd tab of my <code>TabView</code>.</p>
  <p>Is there a way to do this? Because I have looked up to some articles and nothing relevant especially in <code>TabView</code> context.</p>
  <p>I also have a question tho:</p>
  <ol>
  <li>Is it a right approach to use <code>.fullScreenCover</code>? Or is there another possible solution for example presenting a modal with full screen style (if there's any cause i'm not sure either).</li>
  </ol>
  <p>Any suggestions will be very appreciated, thankyou in advance.</p>