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

Ngọc Nguyên Nguyễn

07/12/2022, 8:13 AM
Hi every one!! I have a list with items = { ParentClass(val child1: Child1Class, val child2: Child2Class, val child3: Child3Class), … } . All class are Immutable. Can I update _viewstate just recompose one of childClass, ignore to recompose all ParentClass??
s

Stylianos Gakis

07/12/2022, 8:16 AM
You can open the layout inspector to check out yourself how your composables recompose. Take a look here https://developer.android.com/jetpack/compose/tooling#recomposition-counts.
n

Ngọc Nguyên Nguyễn

07/12/2022, 8:19 AM
I know it, I just want to ask how can I notify the item change in Lazy Column without create new instance for this item
2 Views