Skip to content

useMount ​

lifecycle
test coverage
Last changed: last month

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

Source ​

Source • Demo

Contributors ​

Avatardebabin
Avatarhywax

Released under the MIT License.