/
v3.0.11Get access

unsubscribe

When some queries data updates are no longer needed, this method should be called specifying original query Subscriptions ID If you're using it inside a hook, you don't need to call it manually the hook automatically handles unsubscription when the component unmounts. However, if you're managing subscriptions inside your own state management (e.g. Redux, or any custom store logic), you are responsible for calling unsubscribe_bulk() manually when the subscriptions are no longer needed.

Request parameters:

NameDescriptionTypeValuesDefault
rid
Subscription ID used to unsubscribe. It is returned immediately (synchronously) from every subscription call.number--
listener
Listener contains related request that was made on the SDK. It is used to unsubscribe from the server.function--

Call example:

unsubscribe({
  rid: '5727868067050970590'
})

Response examples:

{
  code: 0,
  data: null,
  rid: 'bulk_unsubscribe_1772441647544'
}