Skip to content

useMount ​

Category
Lifecycle

Hook that executes a callback when the component mounts

typescript
import { useMount } from '@siberiacancode/reactuse';

Usage ​

typescript
useMount(() => console.log('This effect runs on the initial render'));

Demo ​

Api ​

Parameters

NameTypeDefaultNote
effectEffectCallback-The callback to execute

Contributors ​

Source • Demo