Categoryutility
All hooks19 guides

Utility Hooks

Clipboard, document title, lifecycle helpers, fullscreen, and more.

UtilityBeginnerSSR-safe

useDidUpdate

Effect that skips first render.

import { useDidUpdate } from '@/hooks';
hooks/utility/useDidUpdate.tsOpen guide
UtilityBeginnerSSR-safe

useFavicon

Update the favicon href.

import { useFavicon } from '@/hooks';
hooks/utility/useFavicon.tsOpen guide
UtilityBeginnerSSR-safe

useIsMounted

Stable () => boolean mounted flag.

import { useIsMounted } from '@/hooks';
hooks/utility/useIsMounted.tsOpen guide
UtilityBeginnerSSR-safe

useLatest

Always-current ref — kills stale closures.

import { useLatest } from '@/hooks';
hooks/utility/useLatest.tsOpen guide
UtilityBeginnerSSR-safe

useMounted

true after the component mounts.

import { useMounted } from '@/hooks';
hooks/utility/useMounted.tsOpen guide
UtilityBeginnerSSR-safe

useStableCallback

Stable function identity that calls the latest fn.

import { useStableCallback } from '@/hooks';
hooks/utility/useStableCallback.tsOpen guide
UtilityBeginnerSSR-safe

useUnmount

Run a callback on unmount.

import { useUnmount } from '@/hooks';
hooks/utility/useUnmount.tsOpen guide
UtilityBeginnerSSR-safe

useUpdate

Force a re-render from anywhere in the component.

import { useUpdate } from '@/hooks';
hooks/utility/useUpdate.tsOpen guide