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
import { useAddress } from "@ensforge/react"
function View() {
const { data: address } = useAddress({ name: "nick.eth" })
return <span>{address}</span>
}See also
- The hook types:
ReadResult,WriteResultandReadConfig.
Was this page helpful?