Open liangwangcm opened 2 years ago
SwiftUI Router does not play nicely with NavigationView. Instead, it's meant as a replacement for NavigationView.
For an example how to use SwiftUI Router with the TabView, there's the TabView example in SwiftUIRouter-Examples. The same logical can also be applied to presenting modals.
If NavigationView is a must for your project, I would personally recommend switching over to the new NavigationStack introduced in iOS 16 at WWDC22.
My requirement is: Switch to another tab then push to a certain view under navigation view then finally present a modal?
How can I config routing for this case?
Thanks