Skip to main content

Overview

useFetchEntityByShortId returns a function that fetches an entity by its shortId — the auto-generated short identifier that Sublay assigns to every entity. Short IDs are useful for building readable sharing URLs.

Usage Example

Parameters

shortId
string
required
The short ID to look up. This is the value from entity.shortId.
include
string | string[]
Optional. Populate related fields. Accepted values: "user", "space", "topComment", "saved", "files".

Returns

Entity
Entity
The fetched entity. See Entity data model.