https://kotlinlang.org logo
Title
p

prat

07/25/2022, 3:50 PM
This function should ***not*** be used to (re-)launch ongoing tasks in response to callback
events by way of storing callback data in [MutableState] passed to [key1].
Can someone please give an example of this bad use case for
LaunchedEffect
? I want to make sure that I understand this correctly.
z

Zach Klippenstein (he/him) [MOD]

07/26/2022, 2:52 AM
I think the general idea there is that an event shouldn't trigger recomposition if it doesn't have to. There are better ways to relaunch coroutines when state changes, or have the event handler itself launch.
p

prat

08/02/2022, 1:34 AM
Oh, just saw this. Thanks, Zach!