WBF Academy
SwiftUI Intermediate 2 min read

NavigationStack Typed Destinations

Type-safe navigation with NavigationStack and navigationDestination

iOS Academy

iOS Academy

iOS Engineer

1 month ago

Pass a Hashable value to NavigationLink and declare a matching navigationDestination. SwiftUI handles the push automatically and the destination is lazily instantiated only when needed.

#navigation #SwiftUI #iOS16