hey, is it possible to provide my dispatcher to th...
# compose
j
hey, is it possible to provide my dispatcher to the root composition that is used on
rememberCoroutineScope()
?
d
Could you not just create a wrapper function
myRememberCoroutineScope()
that passes your dispatcher to the context of
rememberCoroutineScope()
(I assume the whole point of this question is that you don't want to specify the dispatcher every time) ?
j
I wanted to provide my dispatcher to try a better synchronization with Instrumented tests on Android (where I would integrate the Dispatcher with IdleResources)... How can I create this
myRememberCoroutineScope
? This could help, but all the places where libraries are using
rememberCoroutineScope
would not be integrated...
d
Yeah it would only help for your own code where you can actually replace the calls
z
runComposeUiTest accepts a context, you can pass a dispatcher in there.