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

docs: createTRPCQueryUtils usage docs are incorrect #5607

Open
1 task done
Ehesp opened this issue Apr 3, 2024 · 0 comments
Open
1 task done

docs: createTRPCQueryUtils usage docs are incorrect #5607

Ehesp opened this issue Apr 3, 2024 · 0 comments
Labels
📚 documentation / examples Improvements or additions to documentation

Comments

@Ehesp
Copy link
Contributor

Ehesp commented Apr 3, 2024

Area of Improvement

The docs state usage as:

const trpc = createTRPCReact<AppRouter>();
const queryClient = new QueryClient();
const clientUtils = createTRPCQueryUtils({ queryClient, client: trpc });

However this throws a typescript error about client being invalid. There's a couple of Discord errors about this:

I'm not sure how to fix this, the types seem quite confusing for me.

Link to related docs

https://trpc.io/docs/client/react/createTRPCQueryUtils

Additional information

No response

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR implementing the suggested changes!

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@Ehesp Ehesp added the 📚 documentation / examples Improvements or additions to documentation label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation / examples Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant