tenzerino
tenzerino
TtRPC
Created by 00000 on 4/23/2025 in #❓-help
how can I set up trpc to work with nested providers?
Seems to be similar to https://github.com/trpc/trpc/discussions/6685. In theory this should be possible, as this has been implemented by this pr, although I'm not sure if your setup is correct. There is a test for multiple trpc providers for @trpc/react-query, where you could look at the setup and if it is implementable in your app.
4 replies
TtRPC
Created by juan on 4/27/2025 in #❓-help
Server actions leaking .env
Server actions are mostly for mutating data, not for fetching it. When u want to fetch data you can just query directly from your client components or use a server-caller for calling procedures on the server. At the same time, none of the code you showed uses your drizzle database or schema, so I would guess that your custom server context, where you add the db to the context for procedures etc., somehow runs on the client somewhere. If you are using TanStack React Query, please make sure that the createTRPCContext method from which you extract useTRPC etc. comes from the @trpc/tanstack-react-query package and isn't one you defined in a server environment. If this is not the case, we would likely need more information to identify the problem.
3 replies
TtRPC
Created by venego on 5/3/2025 in #❓-help
How do I fetch data conditionally?
I would recommend using tanstack-react-query or react-query here (could also be that this is also in @trpc/react, not sure), where you can pass an "enabled" option to only fetch when this is or becomes true.
13 replies
TtRPC
Created by Michael Schaufelberger on 11/27/2024 in #❓-help
Hydration error when using useQuery instead of useSuspenseQuery when prefetching
this is also happening to me, could also fix this by awaiting the prefetch call instead of voiding it like the docs say but that would disable some streaming stuff. really struggling if this is a trpc / tanstack-react-query bug or if im doing something wrong
11 replies