Overview
useEntityList is the primary hook for building entity feeds. Each call receives a unique listId that namespaces its Redux state, so multiple independent lists can coexist on the same page.
See Fetching Entities for a full guide on using this hook.
Usage Example
Props
string
required
Unique identifier for this list. Used to namespace Redux state. Must be stable across renders.
(foreignId: string) => Promise<Record<string, any> | null>
Optional. A function called for each entity with a
foreignId. Its result is merged into the entity under an infusion key. See Infusing Data.Reputation
Theconfig object passed to fetchEntities accepts an optional spaceReputation object that opts each row’s embedded author into an added spaceReputation number. See Reputation.
object
Opt-in. Adds a
spaceReputation number to each row’s embedded author. This object is the primary form — it replaces the deprecated flat config props below. This is a context surface, so spaceId accepts "context".string
deprecated
Deprecated — use
config.spaceReputation.spaceId. The flat form; still accepted (the object wins if both are passed). Accepts a space <uuid>, "none", or "context".boolean
deprecated
Deprecated — use
config.spaceReputation.includeDescendants. Only honored alongside an explicit config.spaceReputationId <uuid>.Return Values
Entity[]
The current list of loaded entities.
(Entity & { infusion: Record<string, any> })[]
Entities merged with data from
infuseData. Empty array if infuseData was not provided.boolean
true while a fetch or load-more is in progress.boolean
true when there are more pages to load.(filters, sort?, config?, options?) => void
Loads the first page with the given filters, sort, and config. Debounced by default (800ms). See Fetching Entities for the full parameter reference.
() => void
Appends the next page of results. Must be called after
fetchEntities has been invoked at least once.(props: EntityListCreateEntityProps) => Promise<Entity | undefined>
Creates a new entity and inserts it into the list. Accepts the same fields as
useCreateEntity, plus insertPosition: "first" | "last".(props: { entityId: string }) => Promise<void>
Deletes an entity and removes it from the local list state.
"createdAt" | "hot" | "top" | "controversial" | "metadata.field" | null
Current sort algorithm.
"upvote" | "downvote" | "like" | "love" | "wow" | "sad" | "angry" | "funny" | null
Current reaction sort type (used when
sortBy is "top")."asc" | "desc" | null
Current sort direction.
"auto" | "numeric" | "text" | "boolean" | "timestamp" | null
Current sort type hint for metadata sorts.
"day" | "week" | "month" | "year" | null
Active time frame filter.
string | null
Active source ID filter (from config).
string | null
Active user ID filter.
boolean
Whether the followed-only filter is active.
KeywordsFilters | null
Active keywords filter.
TitleFilters | null
Active title filter.
ContentFilters | null
Active content filter.
AttachmentsFilters | null
Active attachments filter.
LocationFilters | null
Active location filter.
MetadataFilters | null
Active metadata filter.

