Skip to main content

Overview

useFetchSpaceBySlug returns a callable function that fetches a space using its slug. Slugs are optional, unique per project, and must match the pattern ^[\p{L}\p{N}]+(?:[-_][\p{L}\p{N}]+)*$ (letters, numbers, hyphens, underscores, supports Unicode).

Usage Example

Parameters

slug
string
required
The URL slug of the space.
include
"files" | string[]
Optional. Pass "files" to include avatar and banner file objects.

Returns

Returns a SpaceDetailed object. For most use cases, prefer SpaceProvider slug prop over calling this hook directly.