# useSetRecords

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

Sets, changes or clears a name's records in one write. Signature, options, result and examples for useSetRecords in @ensforge/react.

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

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

Sets, changes or clears a name's records in one write. Preset of `useWrite(Actions.record.set)`.

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

## Signature [#signature]

```ts
function useSetRecords(config?: Parameters<typeof useWrite>[1]): WriteResult< Parameters<typeof Actions.record.set>[1], Actions.record.set.ReturnType, Actions.record.set.ErrorType >
```

## Examples [#examples]

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

function Send() {
  const { mutate, isPending } = useSetRecords()
  return <button disabled={isPending} onClick={() => mutate({ name: "alice.eth", texts: { url: "https://alice.xyz" } })}>Send</button>
}
```

## See also [#see-also]

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