# Notifications

`client.notifications` holds the toast notifications to show: errors and other messages the SDK reports. Integrators can also add their own notifications to the store.

## Reading

```js label="JavaScript"
const { notifications } = client.notifications.store.getLatestValue();

// Filtered by severity
const errors = client.notifications.error;
```

Subscribe to render changes:

```js label="JavaScript"
const unsubscribe = client.notifications.store.subscribeWithSelector(
  (state) => ({ notifications: state.notifications }),
  ({ notifications }) => renderToasts(notifications),
);
```

## Add and dismiss notifications

```js label="JavaScript"
const notificationId = client.notifications.addSuccess({
  message: "Settings saved",
  origin: { emitter: "SettingsPage" },
});

client.notifications.remove(notificationId);
```

---

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