Skip to content

What is the best approach to clear navigation stack from anywhere in the app? #3351

Answered by mbrandonw
Ojas-Chimane asked this question in Q&A
Discussion options

You must be logged in to vote

Question - Is there any alternative I can use to talk to the LoginStore from anywhere in the app to clear the stack?

It is perfectly fine to using global communication mechanisms like NotificationCenter for things like this. A feature can post a notification from an effect, and any other feature can subscribe to notifications in an effect. It works perfectly fine and it is completely testable too.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ojas-Chimane
Comment options

Answer selected by Ojas-Chimane
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