lukeL
tRPC2y ago
1 reply
luke

Clarification on inconsistency between React Query + tRPC docs with serialization

Hey everyone, I have a quick question. I have been exploring using different serialization methods + learning more about tRPC / React Query as a whole.

In my deep dive on the React Query docs, specifically on the Server Rendering & Hydration Serialization section, they mention that superjson is unsafe to use on the server, and recommend using devalue instead. See here, last paragraph: https://tanstack.com/query/latest/docs/framework/react/guides/ssr#serialization

But then, in the tRPC docs, it actually says the opposite, almost verbatim: https://trpc.io/docs/server/data-transformers#different-transformers-for-upload-and-download

Can anyone clarify for me here?
Was this page helpful?