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

useRenew

Renews names. Signature, options, result and examples for useRenew in @ensforge/react. Signature, result and examples for useRenew.

Write hookstable
Since v1.0.0View source

Renews names. Preset of useWrite(Actions.registration.renew).

It wraps registration.renew: the same options, result and errors.

Signature

function useRenew(config?: Parameters<typeof useWrite>[1]): WriteResult< Parameters<typeof Actions.registration.renew>[1], Actions.registration.renew.ReturnType, Actions.registration.renew.ErrorType >

Examples

A button that sends it
import { Duration } from "@ensforge/sdk"
import { useRenew } from "@ensforge/react"

function Send() {
  const { mutate, isPending } = useRenew()
  return <button disabled={isPending} onClick={() => mutate({ names: "alice.eth", duration: Duration.years(1) })}>Send</button>
}

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?