sendou.ink/utils/trpc.ts
Alex Johansson dfb68d06fd
⬆️ upgrade to trpc6 (#444)
* ⬆️ upgrade to trpc6

* `npm run prettier:format`

* Use final release

Co-authored-by: Kalle (Sendou) <38327916+Sendouc@users.noreply.github.com>
2021-05-16 12:25:41 +03:00

11 lines
430 B
TypeScript

import { createReactQueryHooks, createTRPCClient } from "@trpc/react";
import superjson from "superjson";
// Type-only import:
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
import type { AppRouter } from "../pages/api/trpc/[trpc]";
export const transformer = superjson;
// create react query hooks for trpc
export const trpc = createReactQueryHooks<AppRouter>();