@dynamic-labs-sdk/react-hooks is listed here, grouped by category. All hooks require a QueryClientProvider and a DynamicProvider ancestor — mount QueryClientProvider outside DynamicProvider.
New to the hooks? Read How React Hooks Work first — it covers the naming rule, which functions get a hook, and the three shapes (query, mutation, state).
- Hook — the import name from
@dynamic-labs-sdk/react-hooks - Wraps — the client function from
@dynamic-labs-sdk/client - Shape —
query(async read, returns{ data, isLoading, error, refetch }),mutation(async action, returns{ mutate, isPending, error, data }), orstate(reactive value, returns{ data, isLoading, error, refetch })
State hooks
State hooks subscribe to reactive client state and re-render when it changes. They take no arguments and return the TanStack Query result — destructuredata to get the value.
Event hooks
Event hooks subscribe to client events for a component’s lifetime. They auto-unsubscribe on unmount — no manualoffEvent cleanup needed.
Context
Query hooks
Query hooks wrap async read functions. They fetch on mount and return{ data, isLoading, isFetching, error, refetch }. Arguments that accept undefined are pseudo-required — the hook stays disabled until a real value is passed.
Pass queryParams to override TanStack Query options (staleTime, refetchInterval, enabled, etc.).
Wallets & balances
Authentication & security
Fireblocks Flow & swaps
Earn
Vault actions (below, under Mutation hooks) are EVM-only today; these reads are not chain-restricted.useGetYieldPosition and useGetYieldRewards are pseudo-required on walletAccount — they stay disabled until it’s defined.
Funding
Business accounts
WaaS
Mutation hooks
Mutation hooks wrap async write functions. They do not run on mount — callmutate(args) to trigger. Returns { mutate, isPending, data, error, reset }.
Pass mutateParams to set TanStack Query mutation options (onSuccess, onError, retry, etc.).
Authentication
MFA
Wallets
User management
Fireblocks Flow
Earn
EVM-only today — calling these with a non-EVMwalletAccount throws WalletProviderMethodUnavailableError.
useDepositToYieldVault and useWithdrawFromYieldVault invalidate useGetYieldPosition on success; useClaimYieldRewards invalidates useGetYieldRewards. Treat these as nudges — the transaction is broadcast, not necessarily mined, when the mutation resolves.
Funding
Business accounts
WaaS
TypeScript
Every hook with parameters exports aUseXParams type alongside the hook:
Related
- How React Hooks Work — naming rule, shapes, when to use a hook vs. a direct call
- React Hooks reference — setup (
QueryClientProvider+DynamicProvider), state hooks,useOnEvent - React Quickstart (JS SDK)
- Events Catalog