Skip to main content
Each space has its own membership list. Members can be regular users, moderators, or admins. Spaces can require join approval, and moderators/admins can approve, decline, ban, or unban members.

Joining and Leaving

The simplest membership operations are exposed directly from useSpace:
When a space has requireJoinApproval: true, joinSpace() creates a pending membership that must be approved by a moderator or admin before the user becomes active.

Fetching Members

Use standalone hooks to fetch member lists:

Checking Membership Status

Check the current user’s membership without loading the full space:

Approving and Declining Requests

Moderators and admins can process pending membership requests:
Both useApproveMember and useDeclineMember require the caller to be a moderator or admin of the space.

Role Management

Admins can change a member’s role:

Banning and Unbanning

Moderators can ban and unban members:
Banning a member sets their status to "banned". Moderators can only ban regular members. Admins can ban moderators and regular members. Only the space creator can ban admins.

Sub-space Cascade

When a child space is created, all admins and moderators of the parent space are automatically added to the child space with their same roles. This ensures governance cascades to sub-communities without manual setup.

Hook Reference