# useNotifications

> **Info:** This is documentation for **Stream Chat React Native SDK v9**, which is no longer actively maintained. For up-to-date documentation, see the [latest version (v10)](https://getstream.io/chat/docs/sdk/react-native/).

`useNotifications` returns a live list from the client notification store. It re-renders the consumer when notifications are added, removed, or updated, and can optionally filter to an exact notification target.

## Usage

```tsx
import { useNotifications } from "stream-chat-react-native";

const notifications = useNotifications({
  filter: (n) => n.severity === "error",
});
```

By default (no `target` and no `requireTarget: true`), the hook returns every notification in the store. This is useful for global analytics or debug views. Pass an exact `target` to scope to a specific channel, thread, channel list, or thread list. This hook does not infer `NotificationTargetProvider` context on its own; use [`useNotificationTargetContext`](https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/notification-target-context/#usenotificationtargetcontext) or [`useResolvedNotificationTarget`](https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/notification-target-context/#useresolvednotificationtarget) when you need the surrounding target.

## Options

| Option          | Type                                                 | Description                                                                                                                                                                                                                                                     |
| --------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filter`        | `(notification: Notification) => boolean`            | Predicate run after target filtering. Returns the notifications you want to read.                                                                                                                                                                               |
| `requireTarget` | `boolean`                                            | When `true`, return an empty array if no `target` is provided. Used by `NotificationList` to guarantee panel-scoped reads even when the call site has no context.                                                                                               |
| `target`        | `{ hostId: string; panel: NotificationTargetPanel }` | Restrict results to notifications tagged for this exact target. Use [`useResolvedNotificationTarget`](https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/notification-target-context/#useresolvednotificationtarget) to derive one from context. |

## Returns

`Notification[]`: a stable reference that changes when the matching notifications change. See the [`Notification` type in `stream-chat`](https://github.com/GetStream/stream-chat-js/blob/master/src/notifications/types.ts) for the full shape.

## Related

- `useClientNotifications` is the unscoped counterpart: it reads every notification from the client store (`client.notifications.store`) and takes no options or target filtering. Use it for a simple global read when you don't need `filter`/`target` scoping. Returns `{ notifications }`.
- [`useSystemNotifications`](https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/hooks/use-system-notifications/) reads only notifications tagged `system`.
- [`useNotificationListController`](https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/hooks/use-notification-list-controller/) wraps `useNotifications` with snackbar selection + timeout logic.

---

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/hooks/use-notifications/](https://getstream.io/chat/docs/sdk/react-native/v9/ui-components/in-app-notifications/hooks/use-notifications/).