LaunchedEffect doesn't get executed the first time

Viewed 33

So I'm making an application using Jetpack compose, at a certain poit I open a new composable screen using a navigation graph inside a scope.launch{}.

In the destination composable function I have a LaunchedEffect(localContext.current){}, but it never gets executed even at the first launch the code inside the brackets never gets reached.

Anyone knows why?

Thank you!

1 Answers

Have you tried LaunchedEffect(Unit){} it's executed the first time?

Related