gwilliamnn
gwilliamnn12mo ago

How can I enable experimental Suspense on NextJS

O have a project with trpc (v.10^) and nextjs 13, and I wanna test the suspense query, but not show for me, just the normal useQuery.
1 Reply
julius
julius12mo ago
What version? In the early versions you set a flag when creating the hooks, now it’s enabled by default. Can’t remember which version we made it default but otherwise do this:
const trpc = createTRPCNext<AppRouter, unknown, “ExperimentalSuspense”>({
config() { … }
});
const trpc = createTRPCNext<AppRouter, unknown, “ExperimentalSuspense”>({
config() { … }
});