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

RFC: Pt. 3 - Evaluate use of native Proxy #324

Closed
snewcomer opened this issue Oct 19, 2018 · 2 comments
Closed

RFC: Pt. 3 - Evaluate use of native Proxy #324

snewcomer opened this issue Oct 19, 2018 · 2 comments

Comments

@snewcomer
Copy link
Collaborator

This is just an evaluation step. Not necessarily saying we should go with it. Need to evaluate after removing Relay implementation.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

Downside is no IE support

Ref #317 #323 #322

@poteto
Copy link
Collaborator

poteto commented Nov 11, 2018

I investigated this in https://github.com/poteto/validated-proxy, but gave up on it as there wasn't an obvious way to handle async sets and return a promise. I may have missed something though.

@snewcomer
Copy link
Collaborator Author

@poteto Great point. Do you feel like returning a promise from a setter is necessary? Right now, set returns a ValidationResult. It seems like it was deemed true.

Setter happens sync. Validation may be async. However, I'm wondering about the case for returning a ValidationResult from set. We could require the user to call .validate() to get a Promise<ValidationResult> back.

I believe this would allow us to use Proxy and probably squash some persistent issues around our current implementation.

Would love to hear other's thoughts as well!

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

No branches or pull requests

2 participants