Skip to content

Navigation Drawer #38

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

You must be logged in to vote

Thanks for the question! There are no recommendations. The Compose navigation drawer is controlled by the DrawerState, please see the corresponding docs. I see two different approaches when combining the drawer with Decompose.

The first approach is the most simple one - if you don't need any special logic, like closing the drawer on back button click. In this case you can just keep everything on the UI side, and so your business logic (Decompose components) is not involved.

    @Composable
    fun SomeContent(some: Some) {
        val scaffoldState = rememberScaffoldState()
        val scope = rememberCoroutineScope()

        Scaffold(
            scaffoldState = scaffoldState,
         …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arkivanov
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