diffsync
diffsync copied to clipboard
API to work with Redux-like app and Immutable state
Why client is restricted to mutation client.getData()-returned object? I'm working on Redux-based React app, and would like to use something like
client.sync = function(data) {
Object.assign(this.doc.localCopy, data || {} );
this.schedule();
}
What am I missing? Is there any dragons this road? Tried this in my app, don't see any problems.
https://github.com/kadmil/diffsync/blob/master/src/client.js#L122
You could do that, sure :) Would be nice to see some tests for that and maybe an additional polyfill for Object.assign