Michael Long
Dec 3, 2024

--

I personally don't think this is a great solution.

The routes won't work with NavigationLink(value:) nor navigationDestination since they're not hashable.

Nor will they work with @SceneStorage if/when state restoration is desired.

But perhaps worse is the way every destination's internals is exposed to every call site via the dependency requirements.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (2)