Skip to main content
The useSpaceList hook provides a Redux-backed, paginated list of spaces with support for filtering, sorting, and search. It is designed for discovery pages, community browsers, and admin dashboards.

Basic Usage

Filtering and Sorting

Sort Options

Creating and Deleting from a List

useSpaceList also exposes create and delete operations that automatically update the list state:

Multiple Independent Lists

Each useSpaceList call uses a listId to maintain independent Redux state. You can have multiple lists on the same page without interference:

Return Values

spaces
Space[]
The current page of loaded spaces.
loading
boolean
true while fetching.
hasMore
boolean
true if there are more pages to load.
fetchSpaces
function
Trigger a new fetch with the given filters and configuration. Resets to page 1.
loadMore
function
Fetch the next page of results and append to the current list.
createSpace
function
Create a new space and insert it into the list.
deleteSpace
function
Delete a space and remove it from the list.

Hook Reference