Is it possible to launch any coroutines when targeting JavaScript? It doesn't like any of the usual ways like async{}
Example on: https://github.com/thigg/no-kotlinx-in-js
Is it possible to launch any coroutines when targeting JavaScript? It doesn't like any of the usual ways like async{}
Example on: https://github.com/thigg/no-kotlinx-in-js
Yes, you can. Take a look at example-frontend-js
— frontend application written in Kotlin/JS that uses coroutines to implement animations in imperative style.
Don't forget to add a dependency on org.jetbrains.kotlinx:kotlinx-coroutines-core
in your Gradle configs.
allprojects
configure additional dependencies and plugins. –
Inopportune © 2022 - 2024 — McMap. All rights reserved.
import kotlinx.coroutines.*
. Did I get any config wrong? – Czarina