Composable Stacks: Multiple Destinations

Episode #233 • May 1, 2023 • Subscriber-Only

Let’s insert a new feature into the navigation stack. We’ll take things step-by-step, employing an enum to hold multiple features in a single package, and making small changes to how we use our existing APIs before sketching out all-new tools dedicated to stack navigation.

Multiple Destinations
Introduction
00:05
Multiple destinations
00:49
Sketching out a better way
22:44
Next time: improving ergonomics
29:40

Unlock This Episode

Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.

Introduction

Stephen: Further, if we had modularized our application and moved the NumberFactFeature, then without a controlled dependency we would have been in quite a tough spot. In order to run the preview in an SPM module it would need the presence of the Info.plist key we just added, but SPM modules don’t have Info.plists. So it would not be possible to apply that fix in order to get our previews working, which means we would be forced to run our feature in a simulator in order to play around with this code, and that completely destroys the fast iterative cycle that Xcode previews are supposed to give us.

But, with that said, we do have a preview in place, and things are looking good. How do we now make it so that we can drill down to a NumberFactFeature from a CounterFeature?

Let’s try that out.

This episode is for subscribers only.

Subscribe to Point-Free

Access this episode, plus all past and future episodes when you become a subscriber.

See plans and pricing

Already a subscriber? Log in

References

Composable navigation beta GitHub discussion

Brandon Williams & Stephen Celis • Monday Feb 27, 2023

In conjunction with the release of episode #224 we also released a beta preview of the navigation tools coming to the Composable Architecture.