T
TanStack5d ago
stormy-gold

Where to put query client when using DB with Start

Where is the right place to create the instance of query client when using db with start.
3 Replies
extended-salmon
extended-salmon5d ago
like with SSR? That's not yet supported. See https://github.com/TanStack/db/issues/545
GitHub
Add SSR & RSC Support for @tanstack/react-db · Issue #545 · TanSt...
Summary Add server-side rendering (SSR) and React Server Components (RSC) support to @tanstack/react-db following patterns similar to TanStack Query's implementation. This will enable React app...
stormy-gold
stormy-goldOP5d ago
I guess this is just a misunderstanding on my part with how the query client is created when the router is instantiated. I don’t need the data in db to be ssrd. We are using ssr to load a better shell really and then letting the client take over. I was just thinking that I should be using that query client that was created and passed to the router context.
extended-salmon
extended-salmon5d ago
hmm ok what is your question? I don't know that it matters where you put the query client

Did you find this page helpful?