useMount
Lifecycle & refsRuns a callback once when the component mounts
Install
$ npm install @usefy/use-mountQuick start
useMount.tsx
import { useMount } from "@usefy/use-mount";
useMount(() => {
analytics.page();
return () => cleanup();
});API reference
useMount(effect) — runs effect once on mount; an optional returned function runs on unmount.
Go deeper
This page is the quick reference. For every example, prop, and edge case, read the full README — or open Storybook to change props live.