《Umi Hooks》官网笔记-useEventListener

useEventListener

优雅使用 EventListener 的 Hook。

function useEventListener<T extends Target = HTMLElement> (
    eventName: string,
    handler: Function,
    options?: {
        capture?: boolean;
        once?: boolean;
        passive?: boolean;
    }
): MutableRefObject<T>;
文章作者: koral
文章链接: http://luokaiii.github.io/2020/04/21/前端/UmiHooks/Dom/useEventListener/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自