Ketan

    Ketan

    2 years ago
    Is it possible to add condition clause [lets say
    buildWhen (previousState, currentState)
    ] while re-composing the ui widget so if data is not changed for particular child ui widget it won’t be re-composed? Is there any way to achieve this?
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    2 years ago
    If the data hasn’t changed for a composable function, it shouldn’t be recomposed, that’s the default behavior.
    Although how “change” is defined has some subtleties. Your data should be
    @Stable
    , and comply with the associated contract
    Ketan

    Ketan

    2 years ago
    Thanks a lot @Zach Klippenstein (he/him) [MOD]