# useNameHistory

> For the complete documentation index, see [llms.txt](https://ensforge.com/llms.txt).

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

Source: https://ensforge.com/docs/reference/react/use-name-history

<ApiMeta kind="Read hook" stability="stable" since="1.0.0" source="packages/react/src/hooks/named/reads.ts#L364" />

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`](/docs/reference/sdk/indexer/get-history): the same options, result and errors.

## Signature [#signature]

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

## Examples [#examples]

```tsx title="A list with \"Load more\""
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 [#see-also]

- The [hook types](/docs/reference/react#types): `ReadResult`, `WriteResult` and `ReadConfig`.