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

useEnsforge

The client of the nearest EnsforgeProvider. Signature, options, result and examples for useEnsforge in @ensforge/react. Includes examples.

Hookstable
Since v1.0.0View source

The client of the nearest EnsforgeProvider.

Signature

function useEnsforge(): Ensforge.Client

Examples

Calling an action from an event handler
import { Actions } from "@ensforge/sdk"
import { useEnsforge } from "@ensforge/react"

function Check({ name }: { name: string }) {
  const ens = useEnsforge()
  return <button onClick={() => Actions.registration.isAvailable(ens, { name })}>Check</button>
}

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?