State Management · Senior · Question 68 of 75
Which approach suits collaborative editing where several users change the same document offline and online?
- ✓Correct answer: CRDT-based state (e.g. Yjs/Automerge) that merges concurrent changes without a central lock
- 2Last-write-wins with a global Redux store
- 3Locking the whole document while one user edits
Explanation
CRDTs guarantee all replicas converge after exchanging updates. They add memory overhead and need a sync layer, but avoid manual conflict resolution.