> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Track Wallet Events/Changes

> Listen for wallet lifecycle events to keep your UI in sync.

The client is event-first on React Native: every module exposes events you can subscribe to via `on`/`off` (or `once`). Wrapping with [`useReactiveClient`](/react-native/reference/hooks-events/react-hooks) is optional and only needed if you also want reads (e.g., `client.wallets.userWallets`) to trigger React rerenders when they change.

```ts React Native theme={"system"}
import { useEffect } from 'react';
import { useReactiveClient } from '@dynamic-labs/react-hooks';
import { dynamicClient } from '<path to client file>';

export function WalletEventListenerRN() {
  const client = useReactiveClient(dynamicClient);

  useEffect(() => {
    const handlePrimaryChanged = (wallet) => {
      console.log('Primary wallet changed', wallet);
    };

    client.wallets.on('primaryChanged', handlePrimaryChanged);

    return () => {
      client.wallets.off('primaryChanged', handlePrimaryChanged);
    };
  }, [client]);

  return null;
}
```

<Tip>
  Use `once` for one-off listeners: `client.wallets.once('primaryChanged', cb)`.
</Tip>

### Types of events

* State change events: fire when a module variable changes. Names match the variable with `Changed` appended.
* Custom events: fire for specific actions within the module.

### How to listen

Call `on(eventName, callback)` on the module instance. Remove with `off(eventName, callback)`.

```ts theme={"system"}
const handleAuthSuccess = (user) => {
  console.log('User logged in', user);
};

dynamicClient.auth.on('authSuccess', handleAuthSuccess);

// Later, clean up
dynamicClient.auth.off('authSuccess', handleAuthSuccess);
```

### Event catalog

**Auth module**

* `authInit`
* `authSuccess`
* `authFailed`
* `loggedOut`
* `userProfileUpdated`
* `authenticatedUserChanged`
* `tokenChanged`

**Email auth module**

* `emailVerificationFinished`

**SMS auth module**

* `smsVerificationFinished`

**Wallets module**

* `messageSigned`
* `walletAdded`
* `walletRemoved`
* `primaryChanged`
* `userWalletsChanged`

**Embedded wallets module**

* `embeddedWalletCreated`
* `hasWalletChanged`

**Networks module**

* `evmChanged`
* `solanaChanged`
* `suiChanged`

**SDK module**

* `error`
* `loadedChanged`

**UI module**

* `authFlowCancelled`
* `authFlowClosed`
* `authFlowOpened`

**MFA events** (UI module)

* `mfaCompletionSuccess` — returns `{ mfaToken?: string }`
* `mfaCompletionFailure` — returns `{ error: unknown }`
