<https://twitter.com/AndroidDev/status/13632079265...
# compose
m
https://twitter.com/AndroidDev/status/1363207926580711430?s=19 Does this language have a name? Is it Koxml? ๐Ÿ˜€
๐Ÿ‘ 1
๐Ÿ™Œ 1
c
I am missing some methods like componentWillUnmount() or componentDidMount () ๐Ÿ˜†
๐Ÿ˜„ 3
j
Those methods encourage people to think of their widgets as having a lifecycle and being a "thing" (instead of being a functional transformation from data->UI), so I'm glad we never had them as first class citizens on a widget class.ย One of the reasons I advocated so hard for composables to be functions was that I didn't want someone to have the bright idea of adding lifecycle methods back in a future version of Compose.
๐Ÿ™Œ 12
๐Ÿ‘ 3
๐ŸŽ‰ 4
m
Sounds very interesting, would love to read a blog post/watch a talk about this @jim!
a
You don't need lifecycle in Composable functions if they are nothing but UI. Same as there is no lifecycle in normal Android Views. ๐Ÿ˜€
j
That looked very React like.
t
So, we can't use the name "lifecycle" when using Effects or RememberObserver? They are replacement to old onCommit, onActive, onDispose, etc. Associating they to lifecycle is better to understand, I think. In some moments we'll need dispose resources created on "enter" and after "exit" a composable function. Is not that a lifecycle?