darkmoon_uk
12/22/2022, 11:04 AMA, B, C
If I add a view D to the end of the list to make A, B, C,D then D is merely added and A, B, C are not recomposed.
However if I add it to the head of the list D, A, B, C then all are recomposed, I do not want this!
I tried setting layoutId as a hint to Compose/Column that A, B, C remain the same elements, but this didn't work.
Is there some mechanism I'm missing?Filip Wiesner
12/22/2022, 11:19 AMkey(id) { A() }Filip Wiesner
12/22/2022, 11:19 AMis a utility composable that is used to "group" or "key" a block of execution inside of a composition. This is sometimes needed for correctness inside of control-flow that may cause a given composable invocation to execute more than once during composition.key
Filip Wiesner
12/22/2022, 11:22 AMdarkmoon_uk
12/22/2022, 11:32 AMkey just... didn't make the connection to this use case somehow 🤦- thanks for strengthening that synaptic pathway 😁Filip Wiesner
12/22/2022, 11:35 AM