https://kotlinlang.org logo
#compose
Title
# compose
p

popalay

08/20/2020, 5:53 AM
Hey. In dev17 CoroutineContextAmbient has gone. What is the replacement?
a

Adam Powell

08/20/2020, 6:03 AM
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
👍 1
z

Zach Klippenstein (he/him) [MOD]

08/20/2020, 7:42 AM
Just a heads up,
rememberCoroutineScope
won’t compile if you pass a lambda. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1597350451097100
2 Views