Skip to main content
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.

Overview

useDeleteEntity returns a function that deletes an entity. If called from inside an EntityProvider, the provider’s entity state is set to undefined after deletion. Deleting a published entity takes back the author’s reputation for creating it, once: not for a draft, and not again for one already soft-deleted.

Usage Example

Parameters

string
required
The ID of the entity to delete.

Returns

Promise<void> — resolves when the entity is deleted.