T
tRPC

Adding tRPC HOC breaks zustand

Adding tRPC HOC breaks zustand

Aajnart4/20/2023
It seems that adding the trpc hoc breaks my zustand stores initial values and generates bad data. After installing trpc following an install guide, I realized that now my zustand items don't take their initial values anymore. I am not sure why it is due. Happens both with SSR and non SSR setting. My error is the following : (please see the image) I am using yarn to install packages and running latest Nextjs/React.
Aajnart4/20/2023
I know you will say that it is not related but as soon as I don't do api.withTRPC(App) in my _app.tsx it doesn't crash anymore. I am not sure why it happens, please help me investigate it
AKAlex / KATT 🐱4/20/2023
can you make a reproduction? with ssr: false there shouldn't be anything functional changing when you add the HOC
Aajnart4/21/2023
Sure, I’ll try later today Can it be because I add another HOC for translations ? I use Nexti18next as HOC for translations

Looking for more? Join the community!

T
tRPC

Adding tRPC HOC breaks zustand

Join Server
Recommended Posts
Next.js + tRPC, multitenancy, access Next.js Router when setting tRPC headersHey all! I'm writing a multi-tenant solution. Most Next.js pages lie under the `/pages/[tenantKey]/`getInfiniteData returns undefinedI am using the t3-stack. Whenever I am calling getInfiniteData it returns undefined. ``` console.loEnable both `useQuery` and a raw `query` from the frontend (for use in async validation)Hello everyone, some context: ``` . I'm building a project with a variant of the t3 stack (key pointNextjs http endpoint (no prisma)I have simple pages/api/todoEndpint how do i call this endpoint with trcp? I don't want to use prismAdding clerk auth object to createServerSideHelpersSo I followed clerk's docs for TRPC (https://clerk.com/docs/nextjs/trpc) and I added `auth` to the `Call retries were exceeded with ssgI'm running a `create-t3-app` on Node 18. Has anyone seen errors trying to use SSG with TRPC and PrHow does batching work in SSR & nextjs app directory?I'm currently playing with the app directory for nextjs. If I have a SSR client set up like this: `"This is likely not portable" errorRandomly started getting this weird error on my front end, can't find anything online on it. SomethiIntegrate third-party added endpoints into the router definition?Its would be cool but not too important, so I was wondering whether or not it would be possible to hWhy am I seeing 500 errors on responses to clients in production?I'm running my trpc server with NODE_ENV=production with the expressjs adapter, and I'm getting thistrpc auto refreshes page when I lose focusHi, i thought this was a development environment only configuration, but it does it even in productiIncorrect type errorsNo idea if this is a trpc issue, but i'm having a bit of a nightmare with type errors. Nothing is shtest post 2hello againquery debounceHey there ! I wonder if anyone could point me to a standard recipe to achieve query debouncing and