-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[@tanstack/react-query] Adding definition #4557
Conversation
definitions/npm/@tanstack/react-query_v5.x.x/flow_v0.83.x-/react-query_v5.x.x.js
Outdated
Show resolved
Hide resolved
definitions/npm/@tanstack/react-query_v5.x.x/flow_v0.83.x-/test_react-query_v5.x.x.js
Outdated
Show resolved
Hide resolved
}); | ||
}); | ||
|
||
test('UseMutationOptions', () => { |
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.
test('UseMutationOptions', () => { | |
test('useMutation', () => { |
const queryClient = 'new QueryClient()'; | ||
<QueryClientProvider client={queryClient}>{/* Your component */}</QueryClientProvider>; | ||
}); | ||
|
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.
Can you add another small test that tries to import a function that currently isn't typed so that we can ensure that even if we haven't typed it people can still use it
|
||
test('QueryClientProvider', () => { | ||
// Correct usage, but not as string. Need to import QueryClient from @tanstack/react-query | ||
const queryClient = 'new QueryClient()'; |
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.
Why is this a string?
test('QueryClientProvider', () => { | ||
// Correct usage, but not as string. Need to import QueryClient from @tanstack/react-query | ||
const queryClient = 'new QueryClient()'; | ||
<QueryClientProvider client={queryClient}>{/* Your component */}</QueryClientProvider>; |
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.
Maybe try passing a div so that we can prove it takes react children correctly
<QueryClientProvider client={queryClient}>{/* Your component */}</QueryClientProvider>; | |
<QueryClientProvider client={queryClient}><div /></QueryClientProvider>; |
yarn.lock
Outdated
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.
Delete this
useQueryErrorResetBoundary: any, | ||
focusManager: any, | ||
onlineManager: any, | ||
hydration: any, |
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 you need to go through the docs and see what's exposed. I can see for example HydrationBoundary that is missing
Other notes: