Overview
useFetchMutualSpaces returns a callable function that fetches the spaces both the authenticated user and another user are active members of — their spaces in common. The response is a paginated list of Space objects.
Usage Example
Parameters
The other user’s ID. Mutual spaces are computed between this user and the authenticated user.
Number of results per page: a whole number from
1 to 100. Defaults to 20. A larger value is rejected with 400 space/invalid-query, never lowered to 100.Optional. A single value or an array; the only value is
"files". Pass it to populate avatar and banner file objects on each space.Returns
The spaces both users share (Space). Computed fields such as
membersCount and isMember reflect the authenticated user.
