Skip to main content

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

({ listId, ...props }: { listId: string } & FetchEntitiesOptions) => Promise<Entity[] | null>
Fetches a page of entities and dispatches the result into the Redux list state.
({ listId, ...props }: { listId: string } & CreateEntityOptions) => Promise<Entity | undefined>
Creates an entity and inserts it into the specified list. JSON only: it takes no images or files. To create an entity with uploads, use useCreateEntity.
({ listId, entityId }: { listId: string; entityId: string }) => Promise<void>
Deletes an entity and removes it from the specified list.