https://kotlinlang.org logo
#javascript
Title
# javascript
d

David Smith

02/02/2023, 5:54 PM
How should I add a suspending function as an event listener (which is not suspending)? Use
GlobalScope.launch
or do something else?
t

turansky

02/02/2023, 6:26 PM
Do you use React?
b

Big Chungus

02/02/2023, 6:32 PM
There's .asPromise() converter for coroutines returns
d

David Smith

02/02/2023, 8:27 PM
not using react, no
will
.asPromise()
launch the function? Is
GlobalScope
correct in the context of event listeners? I can’t find any documentation about this but I would have thought it would be quite common
27 Views