Shakil Karim

    Shakil Karim

    1 year ago
    Is there any way to mark External classes as
    @Stable
    ?, I'm using MemoryCache.Key from Coil as a parameter to Composable Function, but not sure if by default it's considered Stable.
    cc @Colin White
    d

    dimsuz

    1 year ago
    I second this wish. I have another use case: I have entity-only, kotlin-only android-free gradle module. Which contains data classes, and I don't want to make it depend on
    compose.ui.runtime
    artifact. But when I use classes from this module and pass them into
    @Composable
    functions for rendering, I'd like to mark them as
    @Immutable
    to enable potential optimizations by Compose.
    cc @jim (iirc we also had discussion along these lines, but not about "external" marking)
    Shakil Karim

    Shakil Karim

    1 year ago