Disconnecting and reconnecting from realtime channels
I have a realtime table that i am listening to inserts and updates from with this getStream function.
This works great. However it only works the first time that the page is being loaded. I connect to the stream using LaunchedEffect, and i have tested that the getStream function is called when i return to the page.
I get no events after i return to the page, even though i can listen to the same channel on the supabase website, and events are happening there. Do i have do disconnect from the channel in a specific way or do i have to do something different when i reconnect?
I tried removing the channel with a DisposableEffect like so:
Any ideas?
This works great. However it only works the first time that the page is being loaded. I connect to the stream using LaunchedEffect, and i have tested that the getStream function is called when i return to the page.
I get no events after i return to the page, even though i can listen to the same channel on the supabase website, and events are happening there. Do i have do disconnect from the channel in a specific way or do i have to do something different when i reconnect?
I tried removing the channel with a DisposableEffect like so:
Any ideas?