# useClientActions | @account-kit/react

> Overview of the useClientActions hook from @account-kit/react

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

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function useClientActions<TTransport, TChain, TActions>(
  args,
): UseClientActionsResult<TActions>;
```

Defined in: [account-kit/react/src/hooks/useClientActions.ts:111](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L111)

A [hook](https://github.com/alchemyplatform/aa-sdk/blob/4c3956c01ce5ae3c157f006bf58fffde758e5d1b/account-kit/react/src/hooks/useClientActions.ts) that allows you to leverage client decorators to execute actions
and await them in your UX. This is particularly useful for using Plugins
with Modular Accounts.

## Example

```tsx twoslash
import React from "react";
import { useSmartAccountClient } from "@account-kit/react";
import { sessionKeyPluginActions } from "@account-kit/smart-contracts";
import { useClientActions } from "@account-kit/react";

const Foo = () => {
  const { client } = useSmartAccountClient({
    type: "MultiOwnerModularAccount",
  });
  const { executeAction } = useClientActions({
    client: client,
    actions: sessionKeyPluginActions,
  });

  executeAction({
    functionName: "isAccountSessionKey",
    args: [{ key: "0x0" }],
  });
};
```

## Type Parameters

<table>
  <thead>
    <tr>
      <th align="left">Type Parameter</th>
      <th align="left">Default type</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `TTransport` *extends* [`Transport`](https://viem.sh)
      </td>

      <td>
        [`Transport`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TChain` *extends* `undefined` | [`Chain`](https://viem.sh)
      </td>

      <td>
        `undefined` | [`Chain`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TActions` *extends* `object`
      </td>

      <td>
        `object`
      </td>
    </tr>

  </tbody>
</table>

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `args`
      </td>

      <td>
        [`UseClientActionsProps`](../type-aliases/UseClientActionsProps)\<`TTransport`, `TChain`, `TActions`>
      </td>

      <td>
        the hooks arguments highlighted below. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L10)
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`UseClientActionsResult`](../type-aliases/UseClientActionsResult)\<`TActions`>

an object containing methods to execute the actions as well loading and error states [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useClientActions.ts#L21)