-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
useQuery: adjust for rules of React linting #11853
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ae0cb47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
@@ -1,4 +1,4 @@ | |||
{ | |||
"dist/apollo-client.min.cjs": 39573, | |||
"dist/apollo-client.min.cjs": 39607, |
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 PR actually doesn't change any behaviour, it just tries to give the lint rule a fighting chance of linting this hook. I'm not happy that we get this kind of size increase for that.
We definitely need a rewrite of this, soon!
// React Hook "React.useMemo" cannot be called in a class component. | ||
// eslint-disable-next-line react-hooks/rules-of-hooks |
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.
Ignore the linter error here for now - it goes away once we actually pull that rule in.
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
// there is nothing to really do here with `disableNetworkFetches`, | ||
// we need to reference it here to ensure the effect depends on it | ||
// and resubscribes when it changes and the component is re-rendered by chance | ||
disableNetworkFetches; |
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.
What an odd one! Would love a rewrite of this hook to try and remove this oddity 😆
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.
Creative way to get this linted. Thanks!
Another one for #11511...