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

# useJoinSpace

Hook to join a space.

## Imports

```ts theme={null}
import { useJoinSpace } from '@towns-protocol/react-sdk'
```

## Definition

```ts theme={null}
function useJoinSpace(
  config?: ActionConfig<Spaces["joinSpace"]>,
): {
    data: void | undefined;
    error: Error | undefined;
    isPending: boolean;
    isSuccess: boolean;
    isError: boolean;
    joinSpace: (spaceId: string, signer: Signer, opts?: {
        skipMintMembership?: boolean;
    } | undefined) => Promise<void>;
}
```

**Source:** [useJoinSpace](https://github.com/towns-protocol/towns/blob/main/packages/react-sdk/src/useJoinSpace.ts)

## Parameters

### config

* **Type:** `ActionConfig<Spaces["joinSpace"]>`
* **Optional**

Configuration options for the action.

## Return Type

The joinSpace action and the status of the action.

```ts theme={null}
{
    data: void | undefined;
    error: Error | undefined;
    isPending: boolean;
    isSuccess: boolean;
    isError: boolean;
    joinSpace: (spaceId: string, signer: Signer, opts?: {
        skipMintMembership?: boolean;
    } | undefined) => Promise<void>;
}
```
