MDK Logo

Hooks

Complete hook catalog for the MDK App Toolkit — adapter data hooks, state hooks, component hooks, and utilities

Complete hook catalog for the MDK App Toolkit, covering hooks from both @tetherto/mdk-react-adapter (data, state, utilities) and @tetherto/mdk-react-devkit (component hooks). Grouped by what each hook depends on rather than which package ships it — this matches the Developer entry points model where the adapter and the UI Kit are siblings, so you can adopt only the layers you need.

At a glance

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

All hooks

Components

@tetherto/mdk-react-devkit

Data

@tetherto/mdk-react-adapter

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)

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'
// Data hooks
import { useSitesOverviewData, usePoolStats, useDashboardTimeRange } from '@tetherto/mdk-react-adapter'

On this page