useQuery runs on CSR?!
Hi!
When I try to build my next app, the useQuery hooks from my pages are triggered and fail with TRPCError (because you have to be authenticated).
I am using
ssr: false
and my pages don't use getStaticProps
or getServerSideProps
The useQuery should run only on client side as mentioned in https://nextjs.org/docs/pages/building-your-application/rendering/client-side-rendering
Any idea how to debug/fix this?
Rendering: Client-side Rendering (CSR)
Learn how to implement client-side rendering in the Pages Router.
1 Reply
Did u setup the auth middleware correctly