ethan
Explore posts from serversCDCloudflare Developers
•Created by ethan on 10/2/2024 in #workers-help
How to catch websocket closed due to code changes
1 replies
TTCTheo's Typesafe Cult
•Created by ethan on 11/4/2023 in #questions
If a Next.js 13 Layout is a clientcomponent, is the page automatically a client component as well?
Title should explain it all, lmk if it doesn’t.
5 replies
TTCTheo's Typesafe Cult
•Created by ethan on 11/2/2023 in #questions
Best way to prefetch queries with tRPC and app/ dir
I am in the process of switching my pages/ T3 app to the new fancy app directory and know that React Query has a few ways to prefetch queries, and was wondering which one is the best for use with T3 app dir.
1. initialData
The easiest, but also the most annoying in my eyes. You fetch the data on the server and then pass it down as
initialData
.
2. prefetchQuery & HydrationLayer
Saw this in the docs but i’m not sure if it will work with the extended version of react-query that tRPC uses.
3. @tanstack/react-query-next-experimental
This seems to be brand new, and I can’t really tell what’s different from the second option.
Which method is best for prefetching on the server with T3 app dir?11 replies