NavigationStack: how do path, navigationDestination and deep links work?
The gist
NavigationStack (iOS 16) separates navigation data from views. The stack is a collection of values (the path), and navigationDestination(for:) describes which view to build for a value of a given type. NavigationLink(value:) simply appends a value to the path. Since navigation is data, it is driven programmatically: push is append, pop is removeLast, back to root is clearing it, a deep link is assigning a whole new path.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep