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

fix: React implicit children type #3490

Closed
wants to merge 5 commits into from

Conversation

maddhruv
Copy link
Contributor

@maddhruv maddhruv commented Apr 9, 2022

With this recent change in @types/react - DefinitelyTyped/DefinitelyTyped#56210 the type check fails for QueryClientProvider and other components which have children as a prop.

This is a particular failure when using ^@types/react@18. Adding the children type explicitly to these components.

@vercel
Copy link

vercel bot commented Apr 9, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tanstack/react-query/HjfhdQ8ju7pDhennjkJcZZ75pZ3z
✅ Preview: https://react-query-git-fork-maddhruv-fix-type-explicit-ef496a-tanstack.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 9, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 31bcc46:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

@maddhruv maddhruv changed the base branch from master to beta April 9, 2022 18:12
@maddhruv maddhruv closed this Apr 9, 2022
@maddhruv maddhruv deleted the fix/type-explicit-children branch April 9, 2022 18:12
@maddhruv
Copy link
Contributor Author

maddhruv commented Apr 9, 2022

Closed since this is already being fixed here - #3482

@clothoo
Copy link

clothoo commented Apr 11, 2022

Closed since this is already being fixed here - #3482

Is this a mistake? As in #3482, there's no change to QueryClientProviderProps

@clothoo
Copy link

clothoo commented Apr 11, 2022

My mistake. Reinstall the package the types got updated!

@TkDodo
Copy link
Collaborator

TkDodo commented Apr 11, 2022

Is this a mistake? As in #3482, there's no change to QueryClientProviderProps

Usage of React.FC was removed in an earlier PR for v4, so there was no change necessary

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

6 participants