MDK Logo

Hooks

Reusable React hooks from the MDK App Toolkit

Reusable React hooks shipped by the MDK App Toolkit. Grouped by what each hook depends on, not by which package ships it. This matches the Developer entry points model where UI Core, the React adapter, and the UI Kit are siblings — you should be able to find the hooks you need without adopting layers you do not use.

At a glance

BucketPageWhat it coversNeeds
StateState hooksReact-bound views of the headless @tetherto/mdk-ui-core Zustand stores<MdkProvider> from @tetherto/mdk-react-adapter
ComponentsComponent hooksHooks coupled to MDK styled components or shell layout (notifications, forms, charts, dashboards, filters, widgets, tables)@tetherto/mdk-react-devkit and (for some) <MdkProvider>
UtilitiesUtility hooksGeneric React helpers, mining-domain transforms, permission checks, and TanStack Query re-exports@tetherto/mdk-react-adapter and (for some) <MdkProvider>

All hooks

State

@tetherto/mdk-react-adapter
HookSummary
useAuthReact view of the headless authStore (token, permissions)
useDevicesReact view of the headless devicesStore (device list, selection)
useTimezoneReact view of the headless timezoneStore (operator timezone)
useNotificationsReact view of the headless notificationStore (unread counter)
useActionsReact view of the headless actionsStore (pending submissions)

Components

@tetherto/mdk-react-devkit

Utilities

@tetherto/mdk-react-adapter + @tetherto/mdk-react-devkit/foundation

Imports

import { useNotification, useChartDataCheck } from '@tetherto/mdk-react-devkit/foundation'
import { useAuth, usePagination, useTimezoneFormatter } from '@tetherto/mdk-react-adapter'
import { useFormField, useSidebarExpandedState } from '@tetherto/mdk-react-devkit/core'

On this page