Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "core/usePusher"

Index

Variables

Functions

Variables

Const NOT_IN_CONTEXT_WARNING

NOT_IN_CONTEXT_WARNING: "No Pusher context. Did you forget to wrap your app in a <PusherProvider />?" = "No Pusher context. Did you forget to wrap your app in a <PusherProvider />?"

Functions

usePusher

  • usePusher(): PusherContextValues
  • Provides access to the pusher client instance.

    example
    const { client } = usePusher();
    client.current.subscribe('my-channel');

    Returns PusherContextValues

    a MutableRefObject<Pusher|undefined>. The instance is held by a useRef() hook.

Generated using TypeDoc