Since the `DrawerState.open()` is now `suspend`, i...
# compose
j
Since the
DrawerState.open()
is now
suspend
, is there a new recommended way to open it from the onclick of the menu Icon? I suppose there is a better way than
GlobalScope.launch
?
i
GlobalScope.launch should not be used.
☝️ 2
j
I do know that, I am asking for a Coroutine Scope that should be used
2
a
val myScope = rememberCoroutineScope()
👍 1
j
Alright, will use that then, thanks!
👍 2
v
Or you could use
LaunchedEffect
if that is suitable for you
j
well no, the onclick lambda is not an
@Composable
v
Ah sorry, missed that “onclick” part