> For the complete documentation index, see [llms.txt](/llms.txt).

# React hooks for Web3Auth Modal

Embedded Wallets offers a comprehensive suite of React hooks to streamline integration and state management within your React applications. These hooks abstract away common authentication and wallet operations, enabling you to implement Embedded Wallets' features with minimal boilerplate. Each hook is focused on a specific aspect of Embedded Wallets' functionality, making it easy to implement authentication, wallet operations, and blockchain interactions in your React projects.

## List of React hooks

tip

For detailed usage, configuration options, and code examples, refer to the dedicated documentation page for each hook.

### Web3Auth hooks

| Hook Name                                                     | Description                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| [useWeb3Auth](/embedded-wallets/sdk/react/hooks/useWeb3Auth/) | Core hook for Embedded Wallets initialization and state management. |

### Authentication hooks

| Hook Name                                                                         | Description                                    |
| --------------------------------------------------------------------------------- | ---------------------------------------------- |
| [useWeb3AuthConnect](/embedded-wallets/sdk/react/hooks/useWeb3AuthConnect/)       | Handles Embedded Wallets connection processes. |
| [useWeb3AuthDisconnect](/embedded-wallets/sdk/react/hooks/useWeb3AuthDisconnect/) | Manages disconnection from Embedded Wallets.   |

### Identity hooks

| Hook Name                                                               | Description                                              |
| ----------------------------------------------------------------------- | -------------------------------------------------------- |
| [useAuthTokenInfo](/embedded-wallets/sdk/react/hooks/useAuthTokenInfo/) | Retrieves and manages identity tokens.                   |
| [useWeb3AuthUser](/embedded-wallets/sdk/react/hooks/useWeb3AuthUser/)   | Provides access to the authenticated user's information. |

### Blockchain hooks

| Hook Name                                                           | Description                                             |
| ------------------------------------------------------------------- | ------------------------------------------------------- |
| [useChain](/embedded-wallets/sdk/react/hooks/useChain/)             | Returns the active chain ID and chain namespace.        |
| [useSwitchChain](/embedded-wallets/sdk/react/hooks/useSwitchChain/) | Allows switching between different blockchain networks. |

### Wallet and account linking hooks

| Hook Name                                                               | Description                                                                          |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [useWallets](/embedded-wallets/sdk/react/hooks/useWallets/)             | Lists the wallets connected in the user's session.                                   |
| [useLinkAccount](/embedded-wallets/sdk/react/hooks/useLinkAccount/)     | Links or unlinks external wallets. Import from `account-linking/react`.              |
| [useSwitchAccount](/embedded-wallets/sdk/react/hooks/useSwitchAccount/) | Switches the active wallet to a linked account. Import from `account-linking/react`. |

### Multi-Factor Authentication hooks

| Hook Name                                                       | Description                                                      |
| --------------------------------------------------------------- | ---------------------------------------------------------------- |
| [useEnableMFA](/embedded-wallets/sdk/react/hooks/useEnableMFA/) | Enables Multi-Factor Authentication (MFA) for enhanced security. |
| [useManageMFA](/embedded-wallets/sdk/react/hooks/useManageMFA/) | Provides functionality to manage MFA settings.                   |

### Wallet Services plugin hooks

| Hook Name                                                                             | Description                                         |
| ------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [useWalletConnectScanner](/embedded-wallets/sdk/react/hooks/useWalletConnectScanner/) | Integrates WalletConnect scanner functionality.     |
| [useWalletUI](/embedded-wallets/sdk/react/hooks/useWalletUI/)                         | Manages wallet UI components and user interactions. |
| [useCheckout](/embedded-wallets/sdk/react/hooks/useCheckout/)                         | Facilitates cryptocurrency checkout processes.      |
| [useSwap](/embedded-wallets/sdk/react/hooks/useSwap/)                                 | Enables token swapping capabilities.                |
| [useFunding](/embedded-wallets/sdk/react/hooks/useFunding/)                           | Opens the Wallet Services funding interface.        |
| [useReceive](/embedded-wallets/sdk/react/hooks/useReceive/)                           | Opens the Wallet Services receive interface.        |
| [useWalletServicesPlugin](/embedded-wallets/sdk/react/hooks/useWalletServicesPlugin/) | Provides access to Wallet Services plugins.         |

### Payment hooks

| Hook Name                                                       | Description                                                                          |
| --------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [useX402Fetch](/embedded-wallets/sdk/react/hooks/useX402Fetch/) | Makes x402 payment-gated `fetch` requests. Import from `@web3auth/modal/x402/react`. |
