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
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,WriteResultandReadConfig.
Was this page helpful?