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

useAddress

Reads the address a name points to, for ETH or another coin. Signature, options, result and examples for useAddress in @ensforge/react.

Read hookstable
Since v1.0.0View source

Reads the address a name points to, for ETH or another coin. Preset of useRead(Actions.record.getAddress, …).

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

Signature

function useAddress(options: Actions.record.getAddress.Options | undefined, config?: ReadConfig): ReadResult<Actions.record.getAddress.ReturnType, Actions.record.getAddress.ErrorType>

Examples

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

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

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?