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

Missing docs? Example of setting model values using ResClient/ResModel? #50

Open
lincolnthree opened this issue Sep 28, 2020 · 2 comments

Comments

@lincolnthree
Copy link

Hey all!

First, thanks so much for this project. It's been a great journey so far and I am still learning.

I'm trying to understand how to use ResClient/ResModel to set model properties (including nested properties/arrays/etc), but am having trouble finding the documentation for this.

At first glance it seems like this is a gap in the documentation, which is why I am filing an issue, not asking a question on the forums (though I will also do that.) Could someone point me in the right direction if I have missed them? Otherwise, please consider this a polite note that there may be a gap :)

Thanks so much!

@lincolnthree
Copy link
Author

So for anyone else who ends up here, I read the source code, and it seems that model.set() is just calling client.setModel(), which calls: ''this._send('call', modelId, 'set', props);"

You'd then need to have an appropriate handler in your res-server implementation to handle the call, which I am trying to figure out how to structure properly.

@lincolnthree
Copy link
Author

Just an update. I can't find any reference to setting properties on this page: https://resgate.io/docs/writing-clients/resclient/

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

1 participant