So, we can clearly see that trying to make use of navigation stacks using only the tools that the Composable Architecture gives you access to today is not going to cut it. There is a lot of verbose and ugly code that needs to be written, and there is a lot of room to make things safer and more concise.
Let’s start building the API of our dreams for the navigation stack. We will be able to take a lot of inspiration from how we approached this problem for PresentationState
and PresentationAction
, which worked great for tree-based navigation, but we are also going to have to wade into uncharted territory to extend the ideas to stacks.
So let’s get started.