# useSubnames

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

Lists a name's subnames, page by page, from the indexer. Signature, options, result and examples for useSubnames in @ensforge/react.

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

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

Lists a name's subnames, page by page, from the indexer. Preset of `useInfiniteRead(Actions.indexer.getSubnames, …)`.

It wraps [`indexer.getSubnames`](/docs/reference/sdk/indexer/get-subnames): the same options, result and errors.

## Signature [#signature]

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

## Examples [#examples]

```tsx title="A list with \"Load more\""
import { useSubnames } from "@ensforge/react"

function List() {
  const { items, hasMore, loadMore } = useSubnames({ name: "ens.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`.