What is the difference between LaunchedEffect(Unit) and LaunchedEffect(true)?
m
What is the difference between LaunchedEffect(Unit) and LaunchedEffect(true)?
h
There is no difference, you could also use
LaunchedEffect(42)
or any non changing value/expression
r
Also confirmed implicitly by this
t
The code you have written in it will run every time the key of the Launched effect changes. If you set true or a value that will not change, it will only run once. Unit represents the composable function that you wrote the Launched effect.