interface UsePagedListResult

Returned by usePagedList.

Type Parameters

Properties

setItems: (fn: (items: T[]) => T[]) => void

Does nothing until loaded. Passed to the sync hooks.

loadMore: () => void

It goes to useInfiniteScroll or to a LoadMoreButton.

resync: () => void

Fetches again every page loaded so far and puts them in the list's place, keeping its length and so the scroll. The live lists call it on useOnReconnect, for what changed while the socket was down. A page that fails leaves the list as it was.

Usage

import { type UsePagedListResult } from "src/hooks/feed/usePagedList.ts";