SpaceProvider and useSpace hook are the primary way to work with a single space in your app. The provider fetches and manages the space data; the hook exposes everything to your components.
SpaceProvider
PlaceSpaceProvider anywhere in your tree where space data is needed. You can identify the space by UUID, shortId, or slug — or skip the fetch entirely by passing a pre-fetched space object directly.
Props
UUID of the space to load. Use this,
shortId, or slug.Short identifier of the space. Use this,
spaceId, or slug.URL slug of the space. Use this,
spaceId, or shortId.A pre-fetched space object. Skips the initial fetch if provided. Useful for SSR or when the space is already loaded in a parent component.
Optional. Pass
"files" to include avatar and banner file data in the fetched space.SpaceProvider renders null if none of spaceId, shortId, slug, or space is provided.useSpace
useSpace must be called inside a descendant of SpaceProvider.
Return Values
Space State
The loaded space object.
undefined while loading, null if not found.true while the space is being fetched.Error message if the fetch failed.
Membership & Permissions
true if the current user has an active membership in this space.true if the current user is an admin of this space.true if the current user is a moderator of this space.true if the current user can post entities in this space, based on the space’s postingPermission and the user’s membership status.true if the current user can perform moderation actions in this space.The current user’s raw membership status.
null if not a member.true if the user’s join request is awaiting approval.true if the user is banned from this space.Hierarchy
Ordered list of ancestor spaces from root to direct parent. Empty for root-level spaces.
Preview of the immediate parent space.
null for root spaces.Previews of direct child spaces (up to 10 returned by the API).
Operations
Join the current space. If the space requires approval, the membership enters
pending status.Leave the current space.
Update space settings. Only available to admins.
Delete the space and all associated data. Only available to admins.
Directly set the space state. Useful for optimistic local updates.

