Assigned
Status Update
Comments
an...@google.com <an...@google.com> #2
Also doesn't work in AS 2024.3.2 Canary 4 and Compose 1.8.0-beta01
as...@google.com <as...@google.com> #3
Andrei: Is this the same as
al...@google.com <al...@google.com> #4
Triage notes: Needs investigation. Assigning for later.
zi...@meta.com <zi...@meta.com> #5
Comment has been deleted.
Description
This was surfaced when debugging user reported extra recomposition in
@Stable
class FooState {
var current by mutableStateOf(true)
var target by mutableStateOf(false)
}
@Stable
class Foo(state: FooState) {
var target by mutableStateOf(state.current)
}
@Preview
@Composable
fun ReproRecomposition() {
println("LTD, recomposition")
val fooState = remember { FooState() }
val foo = remember(fooState) { Foo(fooState) }
LaunchedEffect(Unit) {
delay(300)
fooState.current = !fooState.current
println("LTD, current state changed")
}
}