Loading Depth Study
Preparing your workspace
Supabase Realtime provides mechanisms for applications to receive live updates and react to selected database changes.
Realtime features are useful when the UI should reflect changes without requiring a full manual refresh. Applications can subscribe to supported database events and update local state when changes arrive. Common use cases include notifications, live dashboards, collaboration features, activity feeds, and monitoring. Realtime should be used intentionally because broadcasting every change to every client can increase complexity and resource usage.
An admin dashboard can receive new audit log events or live organization activity while the administrator keeps the page open.
const channel = supabase
.channel('course-updates')
.on(
'postgres_changes',
{
event: 'INSERT',
schema: 'public',
table: 'notifications'
},
(payload) => {
console.log('New notification', payload.new);
}
)
.subscribe();The application subscribes to new notification records and receives matching database changes.