Skip to content

How to ensure navigation is ready when messaging handlers are called? #6738

Answered by mikehardy
AlixH asked this question in Q&A
Discussion options

You must be logged in to vote

I don't believe you can ensure navigation is ready when the notification / link / message listeners fire.

I solve it from the other direction. In your app you should maintain a list of pending navigation actions you wish you could take if the navigator was ready, if the navigator is not ready.

When the navigator calls onReady, check for pending navigations and perform the one that is most important.

This works well for me and eliminates any complicated timing setups

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by AlixH
Comment options

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

Comment options

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

@AlixH
Comment options

@AlixH
Comment options

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