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