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