Thread
#compose
    Rick Regan

    Rick Regan

    1 year ago
    I'm looking at the JetNews sample app for its navigation structure and I see that it nests a
    Scaffold
    within a
    Scaffold
    . At the top level it has a Scaffold with a
    NavHost
    in the lambda, and each screen listed in the NavHost (
    composable
    ) has a Scaffold (no lambda). I think I see at least one reason why it does this -- to have a single NavHost at the top and to give each screen its own
    topBar
    -- but I wasn't expecting nested Scaffolds to be a thing (I had thought of it, obviously incorrectly, as a once-per-screen construct). In any case, I wanted to confirm that this is the best (only?) way to structure an app when using navigation.
    K Merle

    K Merle

    1 year ago
    I have a single Scaffold with a single TopBar right now and I am thinking of nesting Scaffolds too as having a single TopBar does seem to lead to a lot of callbacks at this point. The app might not be heading in the best direction with a single TopBar. Still rethinking the approach.