Skip to main content

Overview

useSpaceList provides a stateful, paginated list of spaces with support for filtering, sorting, search, and creation. Each list is identified by a listId and maintains independent Redux state, allowing multiple lists on the same page. For full integration guidance, see Space Lists.

Usage Example

Parameters

string
required
Unique identifier for this list’s Redux state slice. Use distinct IDs for independent lists.

Returns

Space[]
Currently loaded spaces.
boolean
true while fetching.
boolean
true if more pages are available.
function
Trigger a new fetch. Resets to page 1. Accepts filter and config parameters.
() => void
Fetch the next page and append results.
function
Create a new space and insert it into the list.
function
Delete a space and remove it from the list.
string | null
Current sort setting from Redux state.
string | null
Current slug search query from Redux state.
string | null
Current name search query from Redux state.
string | null
Current description search query from Redux state.
string | null
Current general search query from Redux state.
"anyone" | "members" | null
Current reading permission filter from Redux state.
boolean
Current membership filter from Redux state.
string | null
Current parent space filter from Redux state.