# useEnsforge

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

The client of the nearest EnsforgeProvider. Signature, options, result and examples for useEnsforge in @ensforge/react. Includes examples.

Source: https://ensforge.com/docs/reference/react/use-ensforge

<ApiMeta kind="Hook" stability="stable" since="1.0.0" source="packages/react/src/provider/context.ts#L49" />

The client of the nearest `EnsforgeProvider`.

## Signature [#signature]

```ts
function useEnsforge(): Ensforge.Client
```

## Examples [#examples]

```tsx title="Calling an action from an event handler"
import { Actions } from "@ensforge/sdk"
import { useEnsforge } from "@ensforge/react"

function Check({ name }: { name: string }) {
  const ens = useEnsforge()
  return <button onClick={() => Actions.registration.isAvailable(ens, { name })}>Check</button>
}
```

## See also [#see-also]

- The [hook types](/docs/reference/react#types): `ReadResult`, `WriteResult` and `ReadConfig`.