Closed eosobande closed 3 months ago
That's because MutableValue
is similar to BehaviorSubject
from RxJava. It's not necessarily a state holder, but rather an arbitrary value holder. Also, the proposed change would be a behaviour change, which is only possible with a major release (e.g. 4.0.0
).
This however shouldn't not be an issue, since UI frameworks should be handling this case just fine. E.g. with Jetpack Compose, MutableValue
is observed via mutableStateOf
.
Thanks @arkivanov that answers my question
MutableValue::compareAndSet
does not check if the value is changing or not, it just sets the new value and emits.Proposed FIX in
MutableValue::setValue
: