Skip to main content
The Dynamic client emits events for authentication state changes, wallet activity, MFA, device registration, checkout transactions, and project settings. Subscribe to any event with onEvent (or offEvent to remove a listener). React apps can use useOnEvent from @dynamic-labs-sdk/react-hooks for a hook with built-in cleanup.

Subscribing

The listener is fully typed against the event name: hover over event in your editor to see the payload TypeScript expects.

Authentication state

State-change events fire whenever a top-level field on the DynamicClient changes. They are the primary way to react to login, logout, and JWT refreshes.
See Initializing the Dynamic Client for init-status semantics.

Wallet accounts and providers

For per-provider events (account changes, chain switches inside a single provider), see Wallet Provider Events.

MFA

See the MFA overview for how these surface in the broader flow.

Device registration

See Device Registration.

Checkout

These let you build a transaction status UI without polling. See the Fireblocks Flow JavaScript SDK guide.

React patterns

Use useOnEvent from @dynamic-labs-sdk/react-hooks — it subscribes on mount and cleans up on unmount:
For state that should drive re-renders (user, wallet accounts, init status, session), prefer the dedicated hooks (useUser, useGetWalletAccounts, useInitStatus) — they subscribe to the relevant events internally.

One-time listeners

Use onceEvent for a listener that auto-removes after firing once — useful for waiting on initialization or a single MFA completion.

Type safety

The full event surface is declared globally as DynamicEvents, augmented by each module that emits events. onEvent, offEvent, and onceEvent are generic over keyof DynamicEvents, so the listener signature is inferred from the event name — there is no central enum to keep in sync.
Last modified on June 24, 2026