homeEmbeddedNavigationDestination(for:destination:)
Drop-in replacement for .navigationDestination(for:) for hosted extension content. Pair with context.navigator.push(_:title:) or NavigationLink(value:).
Declaration
@MainActor @preconcurrency func homeEmbeddedNavigationDestination<D, Content>(for data: D.Type, @ContentBuilder destination: @escaping (D) -> Content) -> some View where D : Hashable, Content : View
Discussion
// On your root view, register how each pushed route builds its view:
MyRootView()
.homeEmbeddedNavigationDestination(for: Route.self) { route in
switch route {
case .schedule: ScheduleView()
}
}