Skip to main content

Hooks

All custom hooks are exported from @xocialive/ui-components/hooks (or the default barrel).

Available hooks

HookPurpose
useToastDispatch global toast notifications
usePaginationManage page index, page size, and total pages
useDisclosureBoolean open/close state for modals and drawers
useBreadcrumbsBuild breadcrumb trail from the current route
useSyncedSearchParamsSync component state with URL search params

Import

import {
useToast,
usePagination,
useDisclosure,
useBreadcrumbs,
useSyncedSearchParams,
} from "@xocialive/ui-components/hooks";