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 two optional reputation fields that opt each row’s embedded author into an added spaceReputation number. See Reputation.
string
Resolves each row’s embedded author reputation into a
spaceReputation number. Accepts a space <uuid>, "none" (project-general bucket), or "context" (server-derived per row from the request context — useful for mixed-space feeds). Empty string, "general", and null are rejected.boolean
When
true, spaceReputation is the subtree sum (the space plus all its descendants). Only honored when spaceReputationId is an explicit <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.

