Daniel
10/23/2020, 11:46 AMval cached = state.value[key]
val update = computeUpdate()
if (state.value[key] == cached) {
val mutable = state.value.toMutableMap()
mutable[key] = update
state.value = mutable.toMap():
}
EDIT: I also want to ensure that if other keys have been changed in the meantime this function doesn't overwrite them with their previous values