Thread
#compose
    s

    Se7eN

    1 year ago
    Is it acceptable to add like 50-100 (and possibly even more) destinations to a
    NavGraph
    ? I can pass the
    id
    in a route but it would be great if I could do something like this:
    SampleCategory.Buttons.samples.forEach { sample ->
        composable(sample.id) {
            sample.content()
        }
    }
    z

    Zun

    1 year ago
    If they all go to the same screen then you only need 1 composable
    s

    Se7eN

    1 year ago
    They all have different screens. I could make a single destination and then later show the required screen based on
    id
    but it would be great if I didn't have to do that and simply add different composables for all samples
    z

    Zun

    1 year ago
    Can you give a concrete example of what you're making and why you need 100 different composables?
    s

    Se7eN

    1 year ago
    I have a list of UI samples. When a user clicks one of them, I want to show that sample in full screen. That's what I need the
    composable
    for. I don't really need 100 composables. I could make it work with just one too but if it doesn't matter how many I add, I'd prefer the 100 route
    t

    tad

    1 year ago
    Sounds like one destination with an argument