diffsync icon indicating copy to clipboard operation
diffsync copied to clipboard

API to work with Redux-like app and Immutable state

Open kadmil opened this issue 9 years ago • 1 comments

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

kadmil avatar Sep 11 '15 11:09 kadmil

You could do that, sure :) Would be nice to see some tests for that and maybe an additional polyfill for Object.assign

janmonschke avatar Sep 14 '15 15:09 janmonschke