Overview
useJoinSpace returns a callable function for joining a space. If the space has requireJoinApproval: true, the membership is created with status: "pending" until approved by a moderator or admin. Otherwise, it is immediately active. A private space can’t be joined: joining a space the user can’t see answers 404 space/not-found, and its moderators and admins add members with useAddMember.
When using
SpaceProvider, call joinSpace from useSpace — it handles optimistic state updates automatically.Usage Example
Parameters
string
required
UUID of the space to join.
Returns
string
Confirmation message.
object
The created membership record with
id, spaceId, userId, role ("member"), status, and joinedAt.
