https://kotlinlang.org logo
Title
m

Marin Tolić

01/31/2021, 2:39 PM
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

aiidziis

01/31/2021, 2:40 PM
They were replaced by
LaunchedEffect
and
SideEffect
.
m

Marin Tolić

01/31/2021, 2:40 PM
Cheers Aigars!
🙌🏻 1
a

Arkadii Ivanov

01/31/2021, 2:50 PM
DisposableEffect probably?
a

aiidziis

01/31/2021, 2:51 PM
Oh, yeah. Actually
DisposableEffect
. 🤦🏻 So many effects..
m

Marin Tolić

01/31/2021, 2:51 PM
Cheers guys!
t

Timo Drick

01/31/2021, 9:37 PM
SideEffect and LaunchedEffect are not the same. I think DisposableEffect is the closest to onCommit/onDispose. onActive is removed.
s

suresh

02/01/2021, 5:32 PM
DisposableEffect(Unit) - Isn't this same as onActive ?
a

Arkadii Ivanov

02/01/2021, 5:34 PM
It is the same
:thank-you: 1