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

ianrumac

03/12/2023, 10:54 AM
Hey folks! Working on something and got a question for you all - what are the biggest “gotchas” you experienced using Compose, i.e. what are the little things causing bugs that you tend to forget about? is it accidental recomposition? layouting issues? effects? performance problems? let me know in the thread!
a

agrosner

03/12/2023, 11:28 AM
Using any “non mutable” kotlin collection type like List, Map, etc is not considered stable by compose and there are currently zero lint warnings about this that come out of the box!
i

ianrumac

03/12/2023, 12:14 PM
good one! adding that to the list!
s

s3rius

03/12/2023, 12:19 PM
Same goes for lambdas. It's not immediately obvious whether a given lambda is stable or not.
l

Loney Chou

03/12/2023, 4:19 PM
Using lambdas in custom modifier causes recomposition every time the modfier chain gets created, an issue for these lambas not being remembered.
f

Francesc

03/12/2023, 4:42 PM
Using any “non mutable” kotlin collection type like List, Map, etc is not considered stable
that applies to read only too (
List
), you have to use the immutable collections library
i

ianrumac

03/13/2023, 11:48 AM
Thanks folks! filling the list nicely!
7 Views