# useRegister

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

Registers names: commit, wait the minimum age, then register, with every step in steps. Signature, result and examples for useRegister.

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

<ApiMeta kind="Write hook" stability="stable" since="1.0.0" source="packages/react/src/hooks/named/writes.ts#L28" />

Registers names: commit, wait the minimum age, then register, with every step in `steps`. Preset of `useWrite(Actions.registration.register)`.

It wraps [`registration.register`](/docs/reference/sdk/registration/register): the same options, result and errors.

## Signature [#signature]

```ts
function useRegister(config?: Parameters<typeof useWrite>[1]): WriteResult< Parameters<typeof Actions.registration.register>[1], Actions.registration.register.ReturnType, Actions.registration.register.ErrorType >
```

## Examples [#examples]

```tsx title="A button that sends it"
import { Duration } from "@ensforge/sdk"
import { useRegister } from "@ensforge/react"

function Send() {
  const { mutate, isPending } = useRegister()
  return <button disabled={isPending} onClick={() => mutate({ names: "alice.eth", duration: Duration.years(1) })}>Send</button>
}
```

## See also [#see-also]

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