With ballast navigation, is it advisable to have n...
# ballast
c
With ballast navigation, is it advisable to have nested navigation graph? We use it in rare cases like from a group of auth screens to another group of dashboard screens. One advantage is that we don’t have to worry about the auth screens as soon we navigate to the dashboard graph.
c
My personal opinion is that the concept of “nested navigation” is just more confusing than it is helpful, and it’s not really necessary if you can actually manage the backstack however you’d like (which is always quite difficult with Jetpack Navigation library). I’d recommend using a single Router for your entire application, similar in concept to a brower’s URL bar. For those cases where you’re moving from a group of Auth screens to the Dashboard, you can just clear out the backstack entirely at that point. RouteAnnotations make it easy to mark which routes belong to which groups, so you can easily clear them out. There were new Inputs added to v4 which I forgot to update in the docs, but they’re described in the migration guide.
c
I agree with you. We wanted to use
RouteAnnotation
but it’s still experimental and we are refactoring from Jetpack navigation so we couldn’t risk it in to production. What’s the stability like in v4???
c
I need to go through and update the docs, but they can be considered stable at this point, given the new Inputs I added in v4 which works with them
👍 1