[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / InfiniteScroll

# Function: InfiniteScroll()

> **InfiniteScroll**(`props`): [`HtmlNode`](../type-aliases/HtmlNode)

Defined in: [flow/src/components.ts:737](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/components.ts#L737)

A viewport sentinel that runs a server action when it scrolls into view — the
building block for load-more / infinite lists.

## Parameters

### props

[`InfiniteScrollProps`](../interfaces/InfiniteScrollProps)

## Returns

[`HtmlNode`](../type-aliases/HtmlNode)

## Remarks

`onMore` is the method to invoke when the sentinel intersects; pass `show={false}`
(typically a boolean expression like `this.visible < this.all.length`) to stop
loading at the end. `children` replace the default "Loading more…" text.

## Example

```tsx
<InfiniteScroll onMore={this.loadMore} show={this.visible < this.total} />
```
