Thread
#compose
    Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    Do we have stateful Composables as compared to Stateful and Stateless Widgets in Flutter?
    s

    Stew Boling

    2 years ago
    Every Composable can be stateful by using remember { mutableStateOf() } or any of the extensions for Coroutines, Rx and LiveData
    Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    So, if a composable does not remember, it is stateless, right?
    s

    Stew Boling

    2 years ago
    Yep
    l

    Leland Richardson [G]

    2 years ago
    i’m curious: is that distinction useful to you in some way?
    Mehdi Haghgoo

    Mehdi Haghgoo

    2 years ago
    @Leland Richardson [G] I'm not really sure how would it benefit me. I watched your recent YouTube video on Compose and it was great, but I don't think you mentioned anything about a composable being stateful or stateless. So, my guess is it does not matter because state is always managed the same way in Compose, right?
    l

    Leland Richardson [G]

    2 years ago
    Yeah I view whether it is stateful or not as an implementation detail, so no need to distinguish