Skip to main content

Overview

useFetchSpace returns a callable function that fetches a single space by its UUID. The response includes full space details, hierarchy info, and the current user’s membership permissions.

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
UUID of the space to fetch.
SpaceIncludeParam
Optional. A single value or an array; the only value is "files". Pass it to include avatar and banner file objects in the response.

Returns

Returns a SpaceDetailed object, which includes memberPermissions, parentSpace, and childSpaces in addition to all base space fields. memberPermissions is always present and reports what the current user may do in the space, also when they have no membership (isMember: false, status: null); a signed-out user gets the anonymous view. See How permissions are calculated. For most use cases, prefer SpaceProvider over calling this hook directly.