Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 656 Bytes

index.en-US.md

File metadata and controls

32 lines (24 loc) · 656 Bytes

useMount

A hook that will execute the specified callback when the component mounted.

Examples

Default usage

import React from 'react';
import { useMount } from '@vergiss/chooks';

export default () => {
  useMount(() => console.log('Mounted'));
  return (
    <span>Hello world</span>
  )
}

API

useMount(
  callback: (...args: any[]) => any
)

Params

Property Description Type Default
callback Necessary function -