Interface: UseTRPCSubscriptionOptions<TOutput, TError>
Defined in: packages/react-query/src/shared/hooks/types.ts:162
Type Parameters
Type Parameter |
---|
TOutput |
TError |
Properties
enabled?
optional
enabled:boolean
Defined in: packages/react-query/src/shared/hooks/types.ts:168
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:184
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:176
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:180
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:172
Called when the subscription is started
Returns
void