UNPKG

@jcm/use-pusher

Version:

Fork of harelpls/use-pusher with the latest changes on master

14 lines (13 loc) 500 B
import { PusherContextValues } from "./types"; /** * Provides access to the pusher client instance. * * @returns a `MutableRefObject<Pusher|undefined>`. The instance is held by a `useRef()` hook. * @example * ```javascript * const { client } = usePusher(); * client.current.subscribe('my-channel'); * ``` */ export declare function usePusher(): PusherContextValues; export declare const NOT_IN_CONTEXT_WARNING = "No Pusher context. Did you forget to wrap your app in a <PusherProvider />?";