referentialEqualityPolicy

Function

Common
public fun <T> referentialEqualityPolicy(): SnapshotMutationPolicy<T>

A policy to treat values of a MutableState as equivalent if they are referentially (===) equal.

Setting MutableState.value to its current referentially (===) equal value is not considered a change. When applying a MutableSnapshot, if the snapshot changes the value to the equivalent value the parent snapshot has is not considered a conflict.