-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Use reactive var hook #9906
Use reactive var hook #9906
Conversation
👋 @alessbell @MrDoomBringer @hwillson @benjamn Here's an attempt to document this feature! Could someone provide a quick review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jpvajda! See my comments inline, but a few additional things:
-
I think we should move this new content down further on the page. The
useReactiveVar
hook is a nice feature, but it is additive to the reactive variable functionality of the Apollo Client core. For this reason, I think we should introduce people to reactive variables as a core library concept first, then introduce them to the hook. I think your content would fit well merged into theReacting
part of this page, replacing theWith the useReactiveVar hook ...
paragraph. -
I think we should also document
useReactiveVar
alongside our other hooks, in the API section of the docs: https://www.apollographql.com/docs/react/api/react/hooks
Thanks again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome @jpvajda - just one more small thing then I think we're 👍. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of stylistic nits that I'll let Stephen confirm/reject when he's back online, but overall found this very clear and easy to follow 😄
This is failing a single test in CI, but passes on my local branch.
|
re running the test in Circle CI got it to pass. 🤷 |
This PR attempts to better document the
useReactivevVar
hook introduced in #6867