Tolriq
10/14/2021, 6:06 PMval value by remember {
derivedStateOf {
otherstate.value = state.value + calculation
otherstate.value
} }
Wrapper { value }
With wrapper being a simple composable to avoid inlining and so only have it's content recomposed. If I do not read the value somewhere the derivedStateOf is not updated. I'm probably missing something obvious.Adam Powell
10/15/2021, 1:35 PMotherstate.value
here instead of defining this as
val value by remember {
derivedStateOf { state.value + calculation }
}
?Tolriq
10/15/2021, 1:45 PMTolriq
10/15/2021, 1:47 PMTolriq
10/15/2021, 1:49 PMTolriq
10/15/2021, 1:50 PM