> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch many workspaces (wrapper)

> Paginated workspace list with accumulation and load-more

## Overview

`useFetchManyWorkspacesWrapper` follows the **Wrapper pattern** (mirroring `useFetchManyEntitiesWrapper`). It manages page state, accumulates results, and exposes a `loadMore`. There is **no** Redux slice — this is the house-style list hook for workspaces.

## Usage Example

```tsx theme={null}
import { useFetchManyWorkspacesWrapper } from "@sublay/react-js";

function WorkspaceList() {
  const { workspaces, loading, hasMore, loadMore } =
    useFetchManyWorkspacesWrapper({ limit: 10, include: ["memberCount"] });

  return (
    <div>
      {workspaces.map((w) => (
        <div key={w.id}>{w.name} — {w.memberCount} members</div>
      ))}
      {hasMore && <button disabled={loading} onClick={loadMore}>Load more</button>}
    </div>
  );
}
```

## Parameters

<ParamField path="limit" type="number">
  Page size. Defaults to `10`.
</ParamField>

<ParamField path="include" type="string | string[]">
  Include flags. `memberCount` adds each accumulated workspace's **direct** member count; omit it and the field is absent. An array is joined with commas.
</ParamField>

## Returns

| Field | Type | Description |
| - | - | - |
| `workspaces` | `Workspace[]` | Accumulated list. |
| `loading` | `boolean` | Whether a fetch is in flight. |
| `hasMore` | `boolean` | Whether more pages remain. |
| `loadMore` | `() => void` | Fetch the next page. |

## Related

* [List Workspaces API](/v8/api-reference/workspaces/fetch-workspaces)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.