Overview
useFetchManyEntitiesWrapper is a stateful wrapper around useFetchManyEntities that manages pagination, sorting, and list state for you. Use it when you need a custom entity feed outside of EntityListProvider — for example, a user profile feed, a filtered search results page, or any custom list with infinite scroll.
All filters and sort options mirror those of useFetchManyEntities. Changing any sort option automatically resets the list and re-fetches from page 1.
Usage Example
Parameters
number
Number of entities per page. Default:
10.string | null
Filter to entities created by a specific user.
string | null
Filter to entities associated with a specific source ID.
string | null
Filter to entities in a specific space.
boolean
If
true, return only entities from users the authenticated user follows.EntityIncludeParam
Populate related fields. Accepted values:
"user", "space", "topComment", "saved", "files".EntityListSortByOptions
Initial sort field. Default:
"createdAt".SortByReaction
Initial reaction type to sort by when
sortBy is reaction-based. Default: "upvote"."asc" | "desc"
Initial sort direction. Default:
"desc".SortType
Initial sort algorithm. Options:
"auto", "numeric", "text", "boolean", "timestamp". Used when sorting by a metadata field. Default: "auto".TimeFrame | null
Filter entities to a time window. Options:
"day", "week", "month", "year".KeywordsFilters | null
Filter by keywords. See Entity List Filters.
TitleFilters | null
Filter by title content. See Entity List Filters.
ContentFilters | null
Filter by body content. See Entity List Filters.
AttachmentsFilters | null
Filter by attachments data. See Entity List Filters.
LocationFilters | null
Filter by geographic proximity. See Entity List Filters.
MetadataFilters | null
Filter by metadata fields. See Entity List Filters.
Returns
Entity[]
The current list of fetched entities. Appended to on each
loadMore call.boolean
true while fetching the initial page or loading more.boolean
true if additional pages are available.EntityListSortByOptions
Current sort field.
SortByReaction
Current reaction type used for reaction-based sorting.
"asc" | "desc"
Current sort direction.
SortType
Current sort algorithm.
(sortBy: EntityListSortByOptions) => void
Change the sort field. Resets the list and re-fetches from page 1.
(sortByReaction: SortByReaction) => void
Change the reaction type for reaction-based sorting. Resets and re-fetches.
(sortDir: 'asc' | 'desc') => void
Change the sort direction. Resets the list and re-fetches from page 1.
(sortType: SortType) => void
Change the sort algorithm. Resets the list and re-fetches from page 1.
() => void
Load the next page of entities. Appends to the existing list.

