Hey guys, what happened to the lifecycle functions...
# compose-desktop
m
Hey guys, what happened to the lifecycle functions in the newer builds? I can’t access the usual suspects like onActive, onCommit, onDispose. Were they renamed or discarded?
a
They were replaced by
LaunchedEffect
and
SideEffect
.
m
Cheers Aigars!
🙌🏻 1
a
DisposableEffect probably?
a
Oh, yeah. Actually
DisposableEffect
. 🤦🏻 So many effects..
m
Cheers guys!
t
SideEffect and LaunchedEffect are not the same. I think DisposableEffect is the closest to onCommit/onDispose. onActive is removed.
s
DisposableEffect(Unit) - Isn't this same as onActive ?
a
It is the same
🙏 1