automerge / hypermerge

Build p2p collaborative applications without any server infrastructure in Node.js
MIT License
1.28k stars 66 forks source link

Question: Why repeat local changes? #87

Closed jimthedev closed 4 years ago

jimthedev commented 4 years ago

Hello. When using repo.watch, why are local changes are repeated?

pvh commented 4 years ago

It catches and prevents race conditions -- changes are applied optimistically in the frontend immediately, then re-sent once they are "finalized" in the backend. It might be possible to detect the no-op case and not emit the change again, but I've been using hypermerge with React which already takes care of that for me.