A diff represents the changes between two versions of structured data. For nested maps, it identifies changed fields and preserves their paths, turning a vague “something changed” into information that reconciliation can use. section 5.2 section 9.4.4
Suppose two mutations begin from previous state. Compare previous with current to see what another mutation changed, then compare previous with next to see what this mutation wants. Disjoint diffs can be combined; overlapping fields indicate a conflict and can cause the mutation to abort. section 5.2 section 5.5
A focused change
Comparing {y: {z: 1}, w: [5]} with {y: {z: 2}, w: [4]} produces a diff containing only y.z = 2 and w = [4].
Figure 5.4 In a three-way merge, we calculate the diff between previous and next, and we apply it to current.
Visualize how a diff from previous to next is applied to current during a three-way merge. section 5.2

