Vengeance
Vengeance7mo ago

useQuery in App Router?

I have a client component that I want to use useQuery in like in pages router, but only query is available
Solution:
where are you importing api from? You have to make sure you import it from /trpc/react.ts
Jump to solution
3 Replies
Solution
siobe
siobe7mo ago
where are you importing api from? You have to make sure you import it from /trpc/react.ts
Vengeance
Vengeance7mo ago
ohhhhhh thank you so much ! was importing from server
Amr Eraky
Amr Eraky6mo ago
I'm trying to use "useQuery" in app directory, with help with this example: https://github.com/trpc/examples-next-app-dir , but it still now working !!
GitHub
GitHub - trpc/examples-next-app-dir
Contribute to trpc/examples-next-app-dir development by creating an account on GitHub.
More Posts
Tranform output data using middleware after handler has run - possible?As the title says, been trying for a couple of hours to modify the return type of the data using midCan we configure cache on a per-request basis?Hi! I’m a big fan of tRPC! I’ve been using it for quite some time. I actually have 2 questions: ## Error in tRPC with Clerk in t3-app routerHi guys, im trying to implement clerk auth in t3 app router. But it gives me this error when im tryiError when converting string from router.query to prisma DB enumHey yall, I'm working on a Next.js application using tRPC and Prisma, and I've encountered an invaliNext.js tRPC router separated to edge-runtime and node-runtimeI would like to separate server into two runtimes - most things can run on edge-runtime, but I have [How To?] Create a record in database on form submission...I have an application using trpc, Cloudfare D1 database, and trpc. I am trying to use a tamagui forHow to obfuscate data via transformerEnd user with adequate knowledge can easily copy JSON data in plain text from network requests in brResponse delay from TRPC using postgresqlI'm using TRPC as backend and for the database using postgresql so while creating using facing delayCapture TRPCClientError so that it does not show in the client's browser consoleIf a TRPCError is thrown from a router procedure, the client will receive a TRPCClientError that wilNetlify function EMFILEIf this is a dumb question just point me in the direction of the stackoverflow. I've scoured discor