I've found various cases positional memorization i...
# compose
m
I've found various cases positional memorization is the "wrong" recompose method, and I actually need a destructive update. Any suggestions better ways to handle this?
z
Why do you need a destructive update, what are you actually trying to do? How does
counted.value
change over time (is it monotonically increasing/decreasing)? Have you tried using
@Pivotal
or
key
? https://developer.android.com/reference/kotlin/androidx/compose/Pivotal https://developer.android.com/reference/kotlin/androidx/compose/package-summary#key(androidx.compose.key.V1,%20kotlin.Function0)
l
@molikto i’d like to understand what it is that you’re wanting/needing? it sounds to me like
key
might be what you want, but not sure until i know more about the scenario you have
m
@Zach Klippenstein (he/him) [MOD] @Leland Richardson [G] thanks!
key
is exactly what I needed