What do you think, did I implement it right? ```@C...
# compose
g
What do you think, did I implement it right?
Copy code
@Composable
val composableScope: CoroutineScope
    get() {
        val context = SupervisorJob() + Dispatchers.Main.immediate
        onDispose {
            context.cancel()
        }
        return CoroutineScope(context)
    }
Or maybe there is out-of-the-box solution?
l
You’re looking for
rememberCoroutineScope()
👍 5