Skip to content
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

Merged
merged 6 commits into from
Dec 15, 2023

Conversation

CarlosPettersen
Copy link
Contributor

Other notes:

});
});

test('UseMutationOptions', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test('UseMutationOptions', () => {
test('useMutation', () => {

const queryClient = 'new QueryClient()';
<QueryClientProvider client={queryClient}>{/* Your component */}</QueryClientProvider>;
});

Copy link
Member

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()';
Copy link
Member

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>;
Copy link
Member

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

Suggested change
<QueryClientProvider client={queryClient}>{/* Your component */}</QueryClientProvider>;
<QueryClientProvider client={queryClient}><div /></QueryClientProvider>;

yarn.lock Outdated
Copy link
Member

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,
Copy link
Member

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

@Brianzchen Brianzchen merged commit f4ac17f into flow-typed:master Dec 15, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants