Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing to stack when inside another navigation stack #30

Open
jblanco-applaudostudios opened this issue Oct 4, 2021 · 1 comment
Open

Comments

@jblanco-applaudostudios
Copy link

Hello, I'm currently having an issue when having two nested NavigationViewCoordinatable.
Currently I have Coordinator1 that starts at its root, then I have a route that routes to Coordinator2, which is also a NavigationViewCoordinatable.

The problem is, if I don't define Coordinator2 as NavigationViewCoordinator<Coordinator2>, I cannot push to the stack, even though it is already inside its parent stack (Coordinator1). If I do define it as NavigationViewCoordinator<Coordinator2> I get duplicated Navigation Bars.

Is this behavior expected, how can I overcome this issue?

@rundfunk47
Copy link
Owner

The second part of your problem is intended behavior. If you embed a NavigationViewCoordinator inside another NavigationViewCoordinator twice you will get duplicated navigation bars, just like if in SwiftUI you would embed a NavigationView within another NavigationView, since basically NavigationViewCoordinator is just a wrapper to create one. I really don't understand what you mean with "cannot push to stack" though. For instance, check StinsenApp and how the User Registration flow is presented in the Unauthenticated Coordinator. It works fine there, I'm guessing that is what you're trying to accomplish? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants