Curious to start a discussion around the usage of NavigationView
or the new NavigationStack
in a complex app structure.
How people have implemented these in their own Apps or if they even use these, or have they come up with their own custom solutions?
I’ll start:
I experimented with a custom solution (not using navigationview or stack at all) using ZStacks on the topmost level of the application essentially. I’ve seen significant improvement in performance and cleaner code execution allowing me to route views inside nested sub views simply referencing an EnvironmentValue
. But, the downside is losing the out of the box, didAppear and didDissappear lifecycle events.
I see NavigationStack is following suit with storing a stack of paths to route. But, sadly doesn’t support iOS 15. Using UIKit’s navigation controller is kind of a pain when wanting to support all 3 platforms too.
But, I wonder if others have done some analysis on trade offs regarding Navigation. Since it’s kind of the cornerstone of an Application as a whole.