https://kotlinlang.org logo
#compose
Title
# compose
a

amar_1995

12/27/2019, 7:38 AM
Is there working sample/example of how to use
onActive
onCommit
onDispose
. I read the sample provided by google, yet not able to figure out how to use it in activity lifecycle. Can anyone explain with proper example how to use dispose with onActive and onCommit.
a

Adam Powell

12/27/2019, 4:22 PM
What are you trying to do? These have nothing to do with the activity lifecycle, though the activity lifecycle may drive parts of composition that will then lead to these being run.
a

amar_1995

12/27/2019, 4:30 PM
Ohh okay
a

Adam Powell

12/27/2019, 4:33 PM
think of onCommit/onDispose as being more like onAttachedToWindow/onDetachedFromWindow for views
4 Views