Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeReact

useSetRecords

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

Write hookstable
Since v1.0.0View source

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

It wraps record.set: the same options, result and errors.

Signature

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

Examples

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

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?