sambor
04/12/2022, 8:56 PMuseEffect(() => {
const todosSubscription = supabase
.from('todos')
.on('*', payload => console.log(payload))
.subscribe()
return () => {
supabase.removeSubscription(todosSubscription)
}
}, [])
Needle
04/12/2022, 8:56 PM/title
command!
We have solved your problem?
Click the button below to archive it.sambor
04/12/2022, 8:58 PMsambor
04/12/2022, 9:00 PMgaryaustin
04/12/2022, 9:03 PMNeedle
04/12/2022, 9:03 PMsambor
04/12/2022, 9:05 PMsambor
04/12/2022, 9:05 PMgaryaustin
04/12/2022, 9:05 PMgaryaustin
04/12/2022, 9:05 PMsambor
04/12/2022, 9:10 PMgaryaustin
04/12/2022, 9:11 PMsambor
04/12/2022, 9:12 PM/**
* REALTIME SUBSCRIPTIONS
* Only allow realtime listening on public tables.
*/
begin;
-- remove the realtime publication
drop publication if exists supabase_realtime;
-- re-create the publication but don't enable it for any tables
create publication supabase_realtime;
commit;
-- add tables to the publication
alter publication supabase_realtime add table public.profiles;
alter publication supabase_realtime add table public.todos;
garyaustin
04/12/2022, 9:16 PMsambor
04/12/2022, 9:17 PMsambor
04/12/2022, 9:18 PMgaryaustin
04/12/2022, 9:19 PMgaryaustin
04/12/2022, 9:25 PM.subscribe((status) => {console.log('status', status)})
in and see if the connection stays connected?
I've sort of run the the usual issues, you might start a support request in case something got messed up on the server side.sambor
04/12/2022, 9:27 PMstatus SUBSCRIBED
garyaustin
04/12/2022, 9:28 PMgaryaustin
04/12/2022, 9:30 PMsambor
04/12/2022, 9:33 PMgaryaustin
04/12/2022, 9:35 PMsambor
04/12/2022, 9:37 PMsambor
04/12/2022, 9:46 PMsambor
04/12/2022, 9:47 PMgaryaustin
04/12/2022, 9:58 PMrustamd
04/21/2022, 3:45 AMrustamd
04/21/2022, 12:17 PMsupabase-js
👍