# RoomClient: entities property

> The entities read-only property of the RoomClient interface is the store of every entity the client holds.

The **`entities`** read-only property of the [`RoomClient`](/docs/client/room-client) interface is the client's [`EntityStore`](/docs/client/entity-store): every entity the client holds, with callbacks for when they enter, change and leave.

## Value

An `EntityStore`. The same store holds the entities across reconnects.

## Description

The store holds the shared state, the player's private state, a presence entry for each player in the room and the room's entities in the player's view, as the room's [interest](/docs/room/interest) decides it. Entities of a hidden kind never arrive.

The client applies each state update to the store whole, then runs the store's callbacks: leaves, enters and changes in the order they happened, then the [`update` event](/docs/client/room-client/update-event). On a reconnect that can't resume, or a change of [`generation`](/docs/client/room-client/generation), every entity leaves and the full state enters again.

## Examples

### Drawing the coins in view

The room's coins enter and leave the player's view as they move, and the client adds and removes a sprite for each.

```ts
// coins.ts
import { connect, defineSchema, entity } from "@irtio/client";

const Coin = entity("coin", { x: "f32", y: "f32" });
const room = await connect("main", { schema: defineSchema({ entities: [Coin] }) });

const sprites = new Map<number, { x: number; y: number }>();
room.entities.onEnter(Coin, (coin) => sprites.set(coin.id, { x: coin.x, y: coin.y }));
room.entities.onChange(Coin, (coin) => sprites.set(coin.id, { x: coin.x, y: coin.y }));
room.entities.onLeave(Coin, (coin) => sprites.delete(coin.id));
```

## See also

- [`EntityStore`](/docs/client/entity-store)
- [`Room.entities`](/docs/room/room/entities), the room's side
- [State sync and interest](/docs/room/guides/state-sync)
