useTableSubscription
useTableSubscription(
table,options?):object
Hook to subscribe to a table’s changes
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
table | string | Table name (with optional schema, e.g., ‘public.products’) |
options? | Omit<UseRealtimeOptions, "channel"> | Subscription options |
Returns
Section titled “Returns”object
| Name | Type | Default value |
|---|---|---|
channel | null | RealtimeChannel | channelRef.current |