Interface: UseTRPCSubscriptionOptions<TOutput, TError>
Defined in: packages/react-query/src/shared/hooks/types.ts:162
Type Parameters​
| Type Parameter |
|---|
TOutput |
TError |
Properties​
enabled?​
optionalenabled: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()?​
optionalonComplete: () =>void
Defined in: packages/react-query/src/shared/hooks/types.ts:184
Called when the subscription is completed on the server
Returns​
void
onData()?​
optionalonData: (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()?​
optionalonError: (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()?​
optionalonStarted: () =>void
Defined in: packages/react-query/src/shared/hooks/types.ts:172
Called when the subscription is started
Returns​
void