Multiple Paths in NavigationStackStore

We're trying to avoid monolithic Path features and we're trying to break the Path into small chunks with no success

is it possible to have multiple Paths while working with a NavigationStackStore?
or
is it possible to have nested NavigationStackStores?

Hi @jecht83, no this is not possible as vanilla SwiftUI does not support nested navigation stacks. If you want a statically typed navigation path then you have no choice but to integrate all the features together into a single unit.

If you truly need to break features apart, then you can use the type erased NavigationPath type in SwiftUI, but then your features will no longer be integrated together.

Just wanted to double check hoping I was missing something

Thanks for your time

Hi @mbrandonw,
I wanted to inquire whether SwiftUI supports nested navigation stacks, as I'm working on a similar project that requires creating micro features and integrating them into a single app.

If SwiftUI doesn't support nested navigation stacks, then do you have any recommendations for workarounds?

Unfortunately no, SwiftUI does not support nested navigation stacks.

1 Like

@mbrandonw,
Thank you for the response.
Do you have any recommendations for workarounds?

@jecht83,
Could you please share how you tackled this problem? I'm currently working on a project with a similar use case.

Since nested NavigationStack is not an option I ended up creating a diagram to visually evaluate the most efficient approach to present those views

Tree-based navigation was the most efficient approach in my case