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

Export useOperator #497

Closed
zenios opened this issue Jan 9, 2020 · 2 comments · Fixed by #499
Closed

Export useOperator #497

zenios opened this issue Jan 9, 2020 · 2 comments · Fixed by #499

Comments

@zenios
Copy link

zenios commented Jan 9, 2020

When the new concurrent mode supported version is released could you also publicly export useOperator?

Right now in one of my projects i am using the useSubjectValue to merge subscription data with custom state and update it using a reducer style approach (via the update method)

From the concurrent mode pull request i noticed that you have replaced useSubjectValue with useOperator and once it is realease i would not be able to update my code unless i fork the hook

Thanks

@kitten
Copy link
Member

kitten commented Jan 9, 2020

Hiya 👋

Yes, it’s our intention to move this back to either react-wonka or create a more generic hook package. We’ve merged this to master only so we can test Wonka 4 and this new hook together properly

Edit: also please note that if you’ve been relying on useSubjectValue providing synchronous updates, that’ll change back to run normal effects are the initial mount.

This is because we’d like to move back to cooperatively scheduling urql’s logic with React’s effects.

@zenios
Copy link
Author

zenios commented Jan 9, 2020

Hi @kitten

Great news. Thanks you very much

As for the Edit part no i was not expecting synchronous updates. As already explained i was merging subscription data with custom state and update at the same time using a reducer approach style.

It worked perfect

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

Successfully merging a pull request may close this issue.

2 participants