UNPKG

media-stream-player

Version:

Player built on top of media-stream-library

12 lines (11 loc) 470 B
import { RefObject } from 'react'; /** * Use a state set by an event: * - default state is false * - when event fired, state is true * * @param {Object} ref A React ref for the element * @param {String} eventName The name of the event setting the state to true * @return {Array} The boolean state and a function to switch state to false */ export declare const useEventState: (ref: RefObject<HTMLElement>, eventName: string) => readonly [boolean, () => void];