Function: createServerSideHelpers()
createServerSideHelpers<
TRouter
>(opts
):ProtectedIntersection
<object
,DecoratedProcedureSSGRecord
<TRouter
["_def"
]["_config"
]["$types"
],TRouter
["_def"
]["record"
]>>
Create functions you can use for server-side rendering / static generation
Type Parameters
Type Parameter |
---|
TRouter extends AnyRouter |
Parameters
Parameter | Type |
---|---|
opts | CreateServerSideHelpersOptions <TRouter > |
Returns
ProtectedIntersection
<object
, DecoratedProcedureSSGRecord
<TRouter
["_def"
]["_config"
]["$types"
], TRouter
["_def"
]["record"
]>>
dehydrate()
dehydrate: (
opts
?) =>DehydratedState
Parameters
Parameter | Type |
---|---|
opts ? | DehydrateOptions |
Returns
DehydratedState
queryClient
queryClient:
QueryClient
See
https://trpc.io/docs/v11/client/nextjs/server-side-helpers