Files
supabase/apps/reference/_supabase_js/generated/removeallchannels.mdx
T
2022-08-15 15:27:07 +02:00

28 lines
727 B
Plaintext

---
id: removeallchannels
title: 'removeAllChannels()'
slug: /removeallchannels
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
---
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
Unsubscribes and removes all Realtime channels from Realtime client.
```js
supabase.removeAllChannels()
```
## Notes
- Removing subscriptions is a great way to maintain the performance of your project's database. Supabase will automatically handle cleanup 30 seconds after a user is disconnected, but unused subscriptions may cause degradation as more users are simultaneously subscribed.
## Examples
### Removes all subscriptions
```js
supabase.removeAllChannels()
```