-
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
Add documentation for useSuspenseFragment
#12356
Conversation
|
|
!docs set-base-branch release-3.13 |
commit: |
@@ -561,7 +561,7 @@ function Item(props: { item: { __typename: 'Item', id: number }}) { | |||
const { complete, data } = useFragment({ | |||
fragment: ItemFragment, | |||
fragmentName: "ItemFragment", | |||
from: item | |||
from: props.item |
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.
Noticed this typo when reading through so I went ahead and fixed this.
size-limit report 📦
|
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
Our list will now render as soon as our list returns but before the data for `ItemFragment` is loaded. | ||
|
||
<Caution> |
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 know we are trying to use <Caution>
sparingly, but this one seemed like a good use of it. If you don't abide by this rule then you will have a forever-suspending component which might frustrate you. I'm welcome to other ideas if this still doesn't pass the bar.
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.
Agreed, definitely something worth cautioning!
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.
This reads good to me :)
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.
LGTM! Just a couple of teeny nits of style/clarity.
|
||
Our list will now render as soon as our list returns but before the data for `ItemFragment` is loaded. | ||
|
||
<Caution> |
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.
Agreed, definitely something worth cautioning!
Co-authored-by: Maria Elisabeth Schreiber <[email protected]>
Adds some documentation for the new
useSuspenseFragment
hook to the Fragments page.