removeChannel()

Unsubscribes and removes Realtime channel from Realtime client.

1supabase.removeChannel(myChannel)

Parameters#

  • channelrequired
    default

    The name of the Realtime channel.

Notes#

  • Removing a channel is a great way to maintain the performance of your project's Realtime service as well as your database if you're listening to Postgres changes. Supabase will automatically handle cleanup 30 seconds after a client is disconnected, but unused channels may cause degradation as more clients are simultaneously subscribed.

Examples#

Removes a channel#

1supabase.removeChannel(myChannel)