Headsup if you are working with FlowRow/FlowColumn...
# compose
a
Headsup if you are working with FlowRow/FlowColumn. They don't update their content's placements if they are
key()'d
Took me a while to figure out what was going on (opened an issue – more details in 🧵)
👀 1
thank you color 1
tldr: this won't update their positions. removing the
key()
makes it work as expected. same code but with column/row works as expected
Copy code
var list by remember {
            val value = List(5) { it.toString() }
            mutableStateOf(value)
        }

        LaunchedEffect(Unit) {
            while (true) {
                list = list.shuffled()
                delay(1000)
            }
        }

        FlowRow(Modifier.fillMaxSize()) {
            list.forEach {
                key(it) {
                    Text(it)
                }
            }
        }