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

useNameHistory

Lists a name's events (registrations, transfers, record changes), page by page, from the indexer. Signature, result and examples for useNameHistory.

Read hookstable
Since v1.0.0View source

Lists a name's events (registrations, transfers, record changes), page by page, from the indexer. Preset of useInfiniteRead(Actions.indexer.getHistory, …).

It wraps indexer.getHistory: the same options, result and errors.

Signature

function useNameHistory(options: Omit<Actions.indexer.getHistory.Options, "cursor">, config?: { readonly client?: ReadConfig["client"] }): InfiniteReadResult< Actions.indexer.getHistory.ReturnType, Actions.indexer.getHistory.ErrorType >

Examples

A list with
import { useNameHistory } from "@ensforge/react"

function List() {
  const { items, hasMore, loadMore } = useNameHistory({ name: "nick.eth" })
  return <button disabled={!hasMore} onClick={loadMore}>{items.length}</button>
}

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?