Interface: UseTRPCSubscriptionOptions<TOutput, TError>
Type Parameters
Type Parameter |
---|
TOutput |
TError |
Properties
enabled?
optional
enabled:boolean
Deprecated
use a skipToken
from @tanstack/react-query
instead
this will be removed in v12
Defined in
packages/react-query/src/shared/hooks/types.ts:169
onData()?
optional
onData: (data
) =>void
Called when new data is received
Parameters
Parameter | Type |
---|---|
data | TOutput |
Returns
void
Defined in
packages/react-query/src/shared/hooks/types.ts:177
onError()?
optional
onError: (err
) =>void
Called when an unrecoverable error occurs and the subscription is closed
Parameters
Parameter | Type |
---|---|
err | TError |
Returns
void
Defined in
packages/react-query/src/shared/hooks/types.ts:181
onStarted()?
optional
onStarted: () =>void
Called when the subscription is started
Returns
void