This repository was archived by the owner on Nov 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
useLazyQuery #177
Merged
Merged
useLazyQuery #177
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5599c4f:
|
size-limit report 📦
|
msutkowski
commented
Mar 18, 2021
Member
Author
|
Move arg into the hook call site. |
5692070 to
b097568
Compare
Member
Author
|
|
phryneas
reviewed
Mar 21, 2021
bd9822a to
57a2bee
Compare
msutkowski
commented
Mar 21, 2021
3 tasks
phryneas
reviewed
Mar 21, 2021
25d1a65 to
4771d0a
Compare
Member
Author
|
Okay, remaining issues with this:
|
07cfc1e to
7176c0b
Compare
msutkowski
commented
Mar 27, 2021
Member
Author
msutkowski
left a comment
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.
I think this looks good. I agree with everyone who says hooks can be hard :)
Co-authored-by: Lenz Weber <[email protected]>
Co-authored-by: Lenz Weber <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces
useLazyQuery, which allows users to opt-in to calling a query with arguments.Once a request is made, the query will stay subscribed to any changes while mounted in the scenario that there are other components mounted with the same query. If the arg that
fetchThingis called with changes, it will perform a new request and then behave the same way. Additionally, we always unsubscribe an existing query before initiating a new one when thetriggeris called.[insert visual reference :D]