Server-Side Rendering and Live Queries

TanStack Start routes render on the server for the first pageload of a browsing session. Neither the React Query nor standard Convex useQuery() hooks kick off requests for this data during this initial SSR pass, but the React Query hook useSuspenseQuery() does. The React Query client is then serialized with whatever data was loaded to make it available in the browser at hydration time. This reduces rendering on the server and updating on the client from two steps to one step: isomorphic data fetching with a single hook.

Try reloading this page to see the difference between useSuspenseQuery() and useQuery().

2
User 204710/24/25, 4:13 AM

hey James... what's your favorite ice cream place?

8
User 897410/24/25, 4:13 AM

Hi Jamie- Could you let the customer know we've fixed their issue?

8
User 897410/24/25, 4:13 AM

Hi Nipunn! what's your favorite ice cream place?

8
User 897410/24/25, 4:13 AM

hi James! I'll be late to make the meeting tomorrow morning

7
User 794410/24/25, 1:14 AM

hey Nipunn- what's your favorite ice cream place?

4
User 485410/24/25, 1:13 AM

hey Jamie, I'll be late to make the meeting tomorrow morning

4
User 485410/24/25, 1:12 AM

hey James! how's the weather in SF?

6
User 676010/23/25, 9:54 AM

hello Nipunn- Could you let the customer know we've fixed their issue?

6
User 676010/23/25, 9:54 AM

hey Emma; how's the weather in SF?

6
User 676010/23/25, 9:54 AM

hi James- what's your favorite ice cream place?

6
User 676010/23/25, 9:54 AM

hello James! how's the weather in SF?

6
User 676010/23/25, 9:54 AM

Hi Jamie! what's your favorite ice cream place?

6
User 676010/23/25, 9:54 AM

Hi Nipunn! Could you let the customer know we've fixed their issue?

1
User 103610/21/25, 8:49 AM

hello Nipunn... what's your favorite ice cream place?

6
User 655610/21/25, 7:43 AM

hey James- Could you let the customer know we've fixed their issue?

6
User 655610/21/25, 7:43 AM

hi Nipunn; I'll be late to make the meeting tomorrow morning

6
User 655610/21/25, 7:43 AM

Hi Emma- how was your weekend?

2
User 247510/21/25, 7:43 AM

hi Nipunn- how's the weather in SF?

7
User 77710/20/25, 9:23 AM

Hi Emma! I'll be late to make the meeting tomorrow morning

1
User 17710/20/25, 9:23 AM

Hi James- how's the weather in SF?

1const { data } = useSuspenseQuery(convexQuery(
2 api.messages.listMessages,
3 { channel: "chatty" }
4))
1const { data, isPending } = useQuery(convexQuery(
2 api.messages.listMessages,
3 { channel: "chatty" }
4))

On the browser these queries resume their subscriptions which you can see by .

Another way to opt into server-side data loading is to load the query in a loader.

Learn More

TanStack Start SSR Guide