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

useName

Reads a name's state: owner, manager, expiry, resolver, registry and wrapper status. Signature, options, result and examples for useName in @ensforge/react.

Read hookstable
Since v1.0.0View source

Reads a name's state: owner, manager, expiry, resolver, registry and wrapper status. Preset of useRead(Actions.name.get, …).

It wraps name.get: the same options, result and errors.

Signature

function useName(options: Actions.name.get.Options | undefined, config?: ReadConfig): ReadResult<Actions.name.get.ReturnType, Actions.name.get.ErrorType>

Examples

Reading in a component
import { useName } from "@ensforge/react"

function View() {
  const { data } = useName({ name: "nick.eth" })
  return <span>{data?.owner}</span>
}

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?