# PresenceList: join event

> The join event of the PresenceList interface fires when a player joins the room.

The **`join`** event of the [`PresenceList`](/docs/client/presence-list) interface fires each time a player joins the room and their presence entry arrives.

## Syntax

```ts
addEventListener("join", (event) => {})
```

## Event type

A `PresenceEvent`. It extends `Event` and adds these properties:

`entry` Read only
: The new player's [`PresenceEntry`](/docs/client/presence-entry).

`changed` Read only
: An empty array.

## Description

A player joins when their first connection opens. A player who reconnects within the 10-second grace keeps their entry, so they don't join again: the [`change` event](/docs/client/presence-list/change-event) fires for `connected` instead. A resync doesn't fire `join` for players who stayed either.

The entries in the first state update arrive before `connect()` resolves, so a listener added after it doesn't get `join` for them. Iterate [`room.presence`](/docs/client/room-client/presence) for the players already in the room.

## Examples

### Announcing new players

The client greets each player who joins, and stops when the match starts.

```ts
// arrivals.ts
import { connect } from "@irtio/client";

const room = await connect("lobby");
const lobby = new AbortController();

room.presence.addEventListener("join", ({ entry }) => console.log(`${entry.name || entry.player} joined`), { signal: lobby.signal });

room.addEventListener("message", ({ data }) => {
  if ((data as { type?: unknown } | null)?.type === "start") lobby.abort();
});
```

## See also

- [`leave` event](/docs/client/presence-list/leave-event)
- [`RoomDefinition.onJoin()`](/docs/room/room-definition/onjoin), the room's side
- [Presence](/docs/room/guides/presence)
