It should go with NavigationLink
, if I understand your question correctly. The proper pattern in SwiftUI to reset navigation and return to the welcome screen on logout when using deeply nested NavigationLink
is to manage a NavigationPath
.
With NavigationPath
, we can use removeLast()
to clear the entire stack. If possible, could you share how you are currently managing navigation in your code with NavigationPath
?