Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 272 Bytes

useMount.md

File metadata and controls

22 lines (14 loc) · 272 Bytes

useMount

当组件被挂载时,响应调用 mount 回调的生命周期钩子。

用法

import {useMount} from 'react-use';

const Demo = () => {
  useMount(() => console.log('MOUNTED'));
  return null;
};

参考

useMount(mount);