NavigationStack not affected by EnvironmentObject changes
The reason your code is not working is that you haven’t added anything to your path, so your path is empty. You can simply verify this by adding print(path.count) in your popToRoot method it will print 0 in the console. To work with NavigationPath you need to use navigationDestination(for:destination:) ViewModifier, So for your example, you … Read more