Pranoy
Pranoy3w ago

Convex with TanStack Start

I want to use TanStack Start with Convex in a monorepo, but I have a few doubts. While following the Convex guide for TanStack Start, I didn’t quite understand why it uses useSuspenseQuery. Can’t we just use useQuery and useMutation with Convex? Is it necessary to use useSuspenseQuery? Also, is using Convex with TanStack Start a good idea overall? Will I still be able to use TanStack Start to its full potential?
2 Replies
Convex Bot
Convex Bot3w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart3w ago
Check out this section of the doc: https://docs.convex.dev/client/react/tanstack-start/#server-side-rendering Namely:
Using TanStack Start and Query with Convex makes it particularly easy to live-update Convex queries on the client while also server-rendering them. useSuspenseQuery() is the simplest way to do this
It's optional, meant to work well with TanStack Start's SSR.

Did you find this page helpful?