peer-base / js-delta-crdts

Delta State-based CRDTs in Javascript
192 stars 16 forks source link

migrate internals to immutable types #31

Open pgte opened 5 years ago

pgte commented 5 years ago

A CRDT type is defined in a stateless manner. All return values are supposed to be immutable, and there's a lot of cloning happening just to make sure we don't mutate past state. Instead of that, I think we could have better performance (and less error-prone) if we used immutable types internally.

robchristian commented 4 years ago

Looks like immutable is already in use. Strongly suggest the use of immer instead. Immutability is important, but immutable.js was a train wreck. https://immerjs.github.io/immer/docs/introduction