-
I wonder how NavTarget resolution for a deep child is done? For example the app shows Onboarding/O3 node (see the screenshot below). Now we want to navigate straight into Main/Messages/List node. I assume, that the the Main node is not loaded yet. At the same time the resolution should be done inside Messages node which is either not loaded. How does the library resolve the "Messages.List" NavTarget then? The screenshot is taken from Model-Driven navigation with Jetpack Compose talk. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @sergejsha! For most cases, navigation can be implicit:
This approach is usually preferred as navigation evolves as a sequence of local concerns (each Your other approach can be workflows, by which you can chain together methods of the local api of individual |
Beta Was this translation helpful? Give feedback.
Hey @sergejsha!
For most cases, navigation can be implicit:
O3
fires an event to tellOnboarding
that it's done.O3
can do this either either via a callback or by thefinish()
method everyNode
has.Onboarding
realises the last child has finished (see theonChildFinished()
method you can override if you go withfinish()
instead of a callback). In its local business logic it would realise there's no next child to switch to, so it repeats the same pattern, and finishes.Logged in
catches thatOnboarding
finished, and switches its currentNavTarget
to beMain
Main
when constructed will load its defaultNavTarget
, which can beMessages
in your caseMessages
when constructed will load its def…