I started experimenting with kobweb - it seems to be great š
After playing with a sample application, I tried to convert a simple real project to it, and I had following issues:
⢠the app makes some initialization by calling a
suspend
function before rendering the compose UI
⢠because of the previous requirement, it uses a
suspend main()
function
What are your suggestions to these? Thanks.
(I had some other issues - possibly related to a KSP processor - but I have to investigate it further after the above problem is solved...)
d
David Herman
01/25/2024, 8:21 PM
Apologies, I lost this question in the noise.
Did you ever figure it out? Normally, to get into a suspend context in a
@Page
or Compose HTML more generally, the few ways I'm aware are...
⢠use
val scope = rememberCoroutineScope()
and then launch from it
⢠use
LaunchedEffect(Unit)
, as the launch block in there is suspend scope
⢠use