Overview
useEntityListActions provides the low-level Redux-backed actions that power useEntityList. In most cases you should use useEntityList directly. Use this hook when you need to trigger fetch, create, or delete operations from a component that is separate from the one consuming the list state.
Usage Example
Return Values
fetchEntities (listId: string, options: FetchEntitiesOptions) => Promise<Entity[] | null>
Fetches a page of entities and dispatches the result into the Redux list state. Show FetchEntitiesOptions
sortBy "createdAt" | "hot" | "top" | "controversial" | "metadata.field"
required
sortByReaction "upvote" | "downvote" | "like" | "love" | "wow" | "sad" | "angry" | "funny"
Which reaction top ranks by. Only sent while sortBy is "top".
sortType "auto" | "numeric" | "text" | "boolean" | "timestamp"
Type hint for metadata sorts.
Only show entities from followed users.
timeFrame "day" | "week" | "month" | "year"
Time window filter.
include string | ("space" | "user" | "topComments" | "saved" | "files" | "grants")[]
Populate related data.
With "topComments" included: top comments per entity (server default 1, max 5).
With "topComments" included: the reaction whose raw count ranks them (server default "upvote").
Filter by geographic proximity.
Filter by metadata fields.
createEntity (listId: string, options: CreateEntityOptions) => Promise<Entity | undefined>
Creates an entity and inserts it into the specified list.
deleteEntity (listId: string, options: { entityId: string }) => Promise<void>
Deletes an entity and removes it from the specified list.