@trpc/tanstack-react-query
Version:
TanStack React Query Integration for tRPC
21 lines (20 loc) • 982 B
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_HydrateClient = require("./HydrateClient-DFXk1rLr.cjs");
// src/internals/clientOnly.ts
function throwClientOnly(name) {
throw new Error(`\`${name}\` works only in client components. Call it from a module marked with 'use client'; in server components, use \`createTRPCOptionsProxy\`.`);
}
/**
* `createTRPCContext` for the `react-server` export condition.
* @internal
*/
const createTRPCContextReactServer = () => throwClientOnly("createTRPCContext");
/**
* `useSubscription` for the `react-server` export condition.
* @internal
*/
const useSubscriptionReactServer = () => throwClientOnly("useSubscription");
exports.createTRPCContext = createTRPCContextReactServer;
exports.createTRPCOptionsProxy = require_HydrateClient.createTRPCOptionsProxy;
exports.unstable_createHydrateClient = require_HydrateClient.createHydrateClientReactServer;
exports.useSubscription = useSubscriptionReactServer;