#Router with TRPC

8 messages · Page 1 of 1 (latest)

trail wave
#

Can someone provide an example of how I might integrate TanStack router with TRPC? I'm looking at the Kitchen Sink React Query File Based https://tanstack.com/router/v1/docs/framework/react/examples/kitchen-sink-react-query-file-based, but its not clear how I could use trpc. I think it would be really nice if I could make use of all the TRPC niceties.

visual sage
#

Any specific questions or?

trail wave
#

This is some sudo-code: How can I connect trpc to the Router paradigms

export const Route = createFileRoute("/_authenticated/incidents")({
  component: Incidents,
  loader: trpc.dummy.dum.useQuery()
});
visual sage
#

You can create query utils, pass it your route context and use that to ensure query data

#

Are you ssring?

fleet badge
#

Check the pull requests for the router

#

There's an example there I'm waiting to be merged