Upstream Hook Exports
These exports exist so business projects can import common hooks through @vef-framework-react/hooks instead of managing several third-party entry points directly.
Wrapped Media and Environment Hooks
VEF wraps these Mantine hooks to normalize the getInitialValueInEffect behavior (default false, so the initial value is read on mount rather than deferred to an effect):
| Hook | Signature | Description |
|---|---|---|
useMediaQuery | (query: string, initialValue?: boolean, options?: { getInitialValueInEffect?: boolean }) => boolean | Matches a CSS media query. |
useColorScheme | (initialValue?: "light" | "dark", options?: { getInitialValueInEffect?: boolean }) => "light" | "dark" | Reads the OS-level prefers-color-scheme. |
useReducedMotion | (initialValue?: boolean, options?: { getInitialValueInEffect?: boolean }) => boolean | Reads the OS-level prefers-reduced-motion. |
useElementSize | <T extends HTMLElement>(options?: ResizeObserverOptions) => { ref: RefCallback<T | null>; width: number; height: number } | Tracks an element's size via ResizeObserver; VEF defaults box: "border-box". |
Mantine Re-Exports
Passed through as-is from @mantine/hooks:
useDebouncedCallbackuseDebouncedStateuseDebouncedValueuseDidUpdateuseDocumentTitleuseEventListeneruseFocusTrapuseFullscreenDocumentuseIntersectionuseIntervaluseIsFirstRenderuseIsomorphicEffectuseMergedRefuseMounteduseMutationObserverTargetusePrevioususeResizeObserveruseTimeoutuseWindowEventassignRef— not a hook; a ref-assignment helper used alongsidemergeRefsgetHotkeyHandler— not a hook; builds akeydownhandler from a hotkey listmergeRefs— not a hook; combines multiple refs into one callback ref
Official docs: Mantine Hooks
Hotkey Exports
Passed through as-is from react-hotkeys-hook:
HotkeysProvideruseHotkeysuseHotkeysContextuseRecordHotkeysHotkeyCallback— type of the callback passed touseHotkeysHotkeysOptions— the hook's options type (react-hotkeys-hook'sOptions, renamed)
Official docs: react-hotkeys-hook