fieldnotesai
    Preparing search index...

    Function useRealtimeSubscription

    • Hook to subscribe to realtime changes for a specific table

      Type Parameters

      • T extends { [key: string]: any }

      Parameters

      • table: string

        The table name to subscribe to

      • Optionalfilter: string

        Optional filter string (e.g. "case_id=eq.123")

      • OptionalonUpdate: (payload: RealtimePostgresChangesPayload<T>) => void

        Callback function when data changes

      Returns void