I keep having `Module with the Main dispatcher is ...
# coroutines
r
I keep having
Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
on a
jvm
target
e
Dispatchers.Main
only works if there is an event loop
if you're not in either one of those, you'll have to provide your own
r
I use
compose-multiplatform
So that means I need to create one ?
Nevermind, swing is working. Thank’s !
e
technically it does use Swing for windowing, so the Swing dispatcher works. but what do you need
Main
for in a Compose app?
while Compose as currently implemented runs compositions on the UI thread, conceptually it doesn't need one and may be be multithreaded in the future. MutableState et al. are thread-safe.
r
A separate module need Main. But it was for
iOS
since it wasn’t supporting background threading. But I should remove that now. Thank’s for pointing it out
1115 Views