Something that trips up a lot of people when they’...
# compose
z
Something that trips up a lot of people when they’re first learning Compose is remembering all the different bits of magic that go into making lines like this:
Copy code
var text by remember { mutableStateOf("") }
I made a little cheat sheet to help break it down, and hopefully serve as a quick reference if you forget.
😽 1
❤️ 29
👌🏼 3
👌 17
l
👍 fyi typo in the first line.
z
Whoops, thanks!
l
Copy code
State is to MutableState as List is to MutableList.
as -> what
Great article BTW, and thanks for reminding about the state holding class and using delegates here.
z
@louiscad Thanks for the feedback! Re: that word replacement, “a is to b as x is to y” is a common way to state analogies.
today i learned 1
t
This cheat sheet is great, thank you for putting it together 🙏🏼 !
👍 1