nehalistN
tRPC4y ago
nehalist

SSR and loading indicators - I don't get it

Guess I'm missing something here, but unfortunately I'm having a hard time with the docs: in https://trpc.io/docs/v10/nextjs the example
utils/trcp.ts
sets
ssr: true
, but the
pages/index.tsx
example uses

  const hello = trpc.hello.useQuery({ text: 'client' });
  if (!hello.data) {
    return <div>Loading...</div>;
  }


Since SSR would prevent the page from being rendered until the queries are done, how would this loading indicator ever been shown?
Was this page helpful?