Requires the
entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.Overview
useEntity reads from the nearest EntityProvider in the component tree and returns the entity’s state and actions. It does not fetch data itself — it accesses what EntityProvider has already loaded.
Which related data the entity carries (user, space, topComments, saved, files, grants) is set by the provider’s include prop, along with topCommentsLimit and topCommentsSortByReaction:
useEntity must be used inside an EntityProvider. See EntityProvider & useEntity for setup instructions.Usage Example
Return Values
Updates the entity on the server and syncs local state. Takes the changes alone, e.g.
updateEntity({ title }): the fields of useUpdateEntity without entityId, i.e. title, content, attachments, keywords, location, metadata, mentions, nsfw, images and files (appended, sent as multipart), removeFileIds and include.
