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

Ian Warwick

03/02/2020, 8:56 AM
Hey composers, is
onActive
and
onCommit
etc still considered effects? Just the documentation for
onActive
starts with "
Copy code
An effect used to observe the lifecycle of the composition.
So just wondering so I know what I am talking about when discussing this 😆
a

Adam Powell

03/02/2020, 1:59 PM
It's on our list of terms to revisit for sure. Those two in particular probably have more claim to the name, "effect" than anything else so far as they're things that will happen if and when a composition lands. As we start playing more with multithreading composition this will get more important
👍 1
i

Ian Warwick

03/02/2020, 2:00 PM
Cool cheers Adam 👍
a

Adam Powell

03/02/2020, 2:01 PM
I almost want to reserve
effect {}
as the name for a variant of the same idea that accepts a
suspend
lambda and will cancel the associated coroutine on disposal; it makes for a really slick API for some things
🎉 1
i

Ian Warwick

03/02/2020, 2:26 PM
nice 🤔
6 Views