Skip to content
Discussion options

You must be logged in to vote

Hi @wynioux, you have two options for decoupling the child features.

First, and the easiest, is to simply not use NavigationLink(state:). As you can see it necessarily means that the child feature must be able to compile Path.State, which means it must compile every child feature's State. Instead you can use a Button that sends an action, and then a parent domain listens for that actions and appends to the path. This is what we do the SyncUps demo app provided in the repo (see here).

It's also worth noting that NavigationLink(state:) only really works with the most basic kinds of navigation. You are not allowed to perform any logic when the link is tapped. All that can happen is that the …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wynioux
Comment options

Answer selected by wynioux
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