Hello

I am getting TypeError: Cannot read properties of null (reading 'useContext') When trying to getServerSideProps in next export const getServerSideProps = () => { const protect = api.text2img.protect.useQuery(); console.log(protect); // Pass data to the page via props return { props: { data: "what" } } }
3 Replies
mid
mid2y ago
I followed the guide here https://trpc.io/docs/ssr
mid
mid2y ago
I followed the guide here https://trpc.io/docs/ssr
Server-Side Rendering | tRPC
To enable SSR just set ssr: true in your createTRPCNext config callback.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server