Function

referentialEqualityPolicy

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

referentialEqualityPolicy

Source set: 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.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: