Skip to content
Discussion options

You must be logged in to vote

You cannot create a StackElementID yourself; it is deliberately an opaque type managed by StackState. You can only reference them once StackState has created them.

There are two ways to push elements onto StackState. One is NavigationLinks. The other is that StackState conforms to RangeReplaceableCollection, so you have access to methods on it such as append(Self.Element). That second method sounds like what you want: your header and footer are living at the root view of the NavigationStack, so when a button in them sends an action to the root feature reducer, you handle that action and simply append to StackState programmatically, and that will cause SwiftUI to push the corresponding vie…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@thebarndog
Comment options

@kamcma
Comment options

@thebarndog
Comment options

Answer selected by thebarndog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants