Skip to content

Decompose Navigation Example for a BottomNav based UI #178

Answered by arkivanov
falcon4ever asked this question in Q&A
Discussion options

You must be logged in to vote

@falcon4ever Thanks for good questions!

Regarding the question 1.

Based on the hierarchy you provided, A2 looks like a permanent child of A1. If you need to switch between A1 and A2, and if you want this navigation to be nested (so there is also a backstack of those nodes in Main), then you need intermediate nodes.

          Root      
           |      
          Main (BottomNav lives here)      
       /   |   \
     /     |     \
   A       B       C 
  / \     / \     / \
A1   A2 B1   B2 C1   C2

Now you can navigate between A1 and A2 in A, between B1 and B2 in B, and so on. Components A, B, C should have their own Routers.

Replies: 4 comments 3 replies

Comment options

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

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

Comment options

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

Comment options

You must be logged in to vote
1 reply
@arkivanov
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