-
Notifications
You must be signed in to change notification settings - Fork 267
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
Update React Query #2514
Update React Query #2514
Conversation
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
React Query v4 switches to a new package name, so `react-query` is now `@tanstack/react-query`. Breaking changes: - all query keys must be arrays, so for example `'properties'` is now `['properties']` - query data is read-only in the response from `useQuery` - disabled queries are 'loading' by default, need to switch to `isInitialLoading` flag to prevent blocking page in loading state in case of disabled queries, e.g. Pipeline resource on PipelineRun page when using an inline Pipeline spec as we never need to request a Pipeline resource in that case - `setLogger` removed, logger is now set as a property when defining the QueryClient - `undefined` is no longer a valid value for the data returned for a successful query Package imports and most of the key updates were achieved using the provided codemods. Some manual changes required to address the rest. Tests updated to match including fix for infrequent flake in App.test
0f6dd01
to
48bdd16
Compare
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: briangleeson The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
React Query v4 switches to a new package name, so
react-query
is now@tanstack/react-query
.Breaking changes:
'properties'
is now['properties']
useQuery
isInitialLoading
flag to prevent blocking page in loading state in case of disabled queries, e.g. Pipeline resource on PipelineRun page when using an inline Pipeline spec as we never need to request a Pipeline resource in that casesetLogger
removed, logger is now set as a property when defining the QueryClientundefined
is no longer a valid value for the data returned for a successful queryPackage imports and most of the key updates were achieved using the provided codemods. Some manual changes required to address the rest.
Tests updated to match including fix for infrequent flake in App.test
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
See the contribution guide
for more details.