mlody_krol
mlody_krol9mo ago

Which one method should I use for creating trpc for server componetns in Nextjs 13 App dir

Hi which one I should use experimental_createTRPCNextAppDirServer or createTRPCProxyClient when it comes to defining trpc api for the server components? I mean both works fine with next13 app dir and im confused
2 Replies
Paul
Paul9mo ago
+1
jthrilly
jthrilly9mo ago
I've also got this question! They have totally different APIs, but function fairly similarly in practice. What are the pros and cons of each approach? One thing I've noticed is that using experimental_createTRPCNextAppDirServer with experimental_nextCacheLink was leading to stale data that caused infinite loops for me.