popalay

    popalay

    2 years ago
    Hey. In dev17 CoroutineContextAmbient has gone. What is the replacement?
    Adam Powell

    Adam Powell

    2 years ago
    rememberCoroutineScope()
    and
    launchInComposition {}
    , which one depends on the use case. The former gives you a scope that will be cleaned up that you can use to launch from other events, the latter is useful for more actor-like things
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    2 years ago
    Just a heads up,
    rememberCoroutineScope
    won’t compile if you pass a lambda. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1597350451097100