hi all, i use Decompose and my app currently has ...
# mvikotlin
t
hi all, i use Decompose and my app currently has 2 screens. i would like to use a
Scaffold
and navigate with the
Drawer
(1 item for each screen in the drawer which will then change router state on click). Since the
Scaffold
has multiple parameters related to each screen (title, actions, content), i dont know if it should be part of the root content or part of each screen's content..? Let's say, i would use it as root content. Is it ok to check routerState/children for each
Scaffold
section and then call composable functions depending on the child for each section: Child1Title(), Child1Actions(), Child1Content()? (Are there any examples for
Drawer
navigation with Decompose?)
1
a
Hello! I would put the
Scaffold
in the root's UI. And as you suggested, I would use:
Copy code
val routerState = root.routerState.subscribeAsState()

routerState.activeChild
👍 1
t
nice! and as always: thank you for the fast response! :)
🙏 1