Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to work with Redux-like app and Immutable state #4

Open
kadmil opened this issue Sep 11, 2015 · 1 comment
Open

API to work with Redux-like app and Immutable state #4

kadmil opened this issue Sep 11, 2015 · 1 comment

Comments

@kadmil
Copy link

kadmil commented Sep 11, 2015

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

@janmonschke
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants