# Users

Muted and blocked users are reactive stores on the client. The current user and other users the client has seen are plain objects.

## Initialization

`client.connectUser()` fetches them.

## Reading

```js label="JavaScript"
// The current user (not reactive, updated on `user.updated`)
const currentUser = client.user;

// Any user the client has seen (not reactive)
const otherUser = client.state.users[otherUserId];

// Muted users
const { mutedUsers } = client.mutedUsersStore.getLatestValue();

// Blocked user ids
const { userIds } = client.blockedUsers.getLatestValue();
```

Subscribe to render changes:

```js label="JavaScript"
const unsubscribeMutes = client.mutedUsersStore.subscribe(({ mutedUsers }) =>
  renderMutedUsers(mutedUsers),
);

const unsubscribeBlocks = client.blockedUsers.subscribe(({ userIds }) =>
  renderBlockedUsers(userIds),
);
```

---

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/javascript/state-users/](https://getstream.io/chat/docs/javascript/state-users/).