Overview
useFetchManySpaces returns a callable function for fetching multiple spaces. It supports searching by name, slug, description, or a combined query; filtering by membership or parent space; and sorting.
For paginated, stateful lists with load-more support, use useSpaceList instead.
Without
parentSpaceId (or with parentSpaceId=null) this is a discovery surface: only spaces that are public themselves and have only public spaces above them are listed, for every caller. With parentSpaceId=<id>, the list shows the direct sub-spaces of that space the caller can see that are public or that the caller is an active member of — so an unlisted sub-space appears only to its members, and a private one only to its active members. memberOf=true returns the caller’s own spaces regardless of visibility. See Space visibility.Usage Example
Parameters
Sort order:
"newest", "members" (most members first), or "alphabetical". Defaults to "members".Filter to child spaces of a specific parent. Pass
null for root-level spaces only. A specific parent lists the sub-spaces the caller can see that are public or that the caller is an active member of.Filter by each space’s
nsfwEffective (own flag OR any ancestor). "include-all" (default) adds no predicate; "exclude" drops effective-NSFW spaces; "only" returns only them. Because the filter keys off effective status, "only" may return an NSFW child whose safe parent is omitted — results are not guaranteed to form a contiguous tree. See Space NSFW flagging.Returns
Array of Space objects.

