merge
Merge conflicting changes in snapshots. This is only called if current and applied are not equivalent. If a valid merged value can be calculated then it should be returned.
For example, if the state object holds an immutable data class with multiple fields, and applied has changed fields that are unmodified by current it might be valid to return a new copy of the data class that combines that changes from both current and applied allowing a snapshot to apply that would have otherwise failed.
Samples
androidx.compose.runtime.samples.counterSample