Skip to content

useRealtime

useRealtime(options): object

Hook to subscribe to realtime changes for a channel

NOTE: The callback and invalidateKey are stored in refs to prevent subscription recreation on every render when inline functions/arrays are used.

ParameterType
optionsUseRealtimeOptions

object

NameTypeDefault value
channelRealtimeChannel | nullchannelRef.current