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
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.Membership & Permissions
true if the current user can post entities in this space, based on the space’s postingPermission and the user’s membership status.The current user’s raw membership status.
null if not a member.Hierarchy
Ordered list of ancestor spaces from root to direct parent. Empty for root-level spaces.
Operations
Join the current space. If the space requires approval, the membership enters
pending status.Update space settings. Only available to admins.

