How should I add a suspending function as an event...
# javascript
d
How should I add a suspending function as an event listener (which is not suspending)? Use
GlobalScope.launch
or do something else?
t
Do you use React?
b
There's .asPromise() converter for coroutines returns
d
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