Why pop to root does not work in this sample code SwiftUI?
问题 For the purpose of this question, I have provided minimum sample code to re-create the bug. Just copy/paste it to run. import SwiftUI final class Popper: ObservableObject { @Published var shouldProceed: String? = nil var id: String init(id: String) { self.id = id } } struct ContentView: View { @StateObject var popper = Popper(id: "ROOT") var body: some View { NavigationView { VStack(spacing: 40) { Text("You are now in ROOT").font(.largeTitle) Text("Tap Here to goto V1").onTapGesture { popper