https://trpc.io/blog/introducing-tanstack-react-query-client
import { useQuery } from '@tanstack/react-query';
import { useTRPC } from './trpc';
export function Greeting() {
const trpc = useTRPC();
const greetingQuery = useQuery(trpc.greeting.queryOptions({ name: 'Jerry' }));
// greetingQuery.data === 'Hello Jerry'
// [...]
}
The new integration style seems really nice and makes it easier for users coming from React Query to adapt to.
https://trpc.io/blog/introducing-tanstack-react-query-client
The new integration style seems really nice and makes it easier for users coming from React Query to adapt to.