/// The main listing view for the app, showing all the articles we downloaded.
@NavigationRoot struct Root: View {
@ViewModel private var viewModel = RootViewModel()
var content: () -> ArticlesList
var body: some View {
switch viewModel.destination {
case .root:
NavigationStack {
content()
}
case .none:
EmptyView()
}
}
}
When trying to use the @navigable without Tabs as Root of the navigation I need a root implementation e.g.