const { openInAppNotification, closeInAppNotification, notifications } =
useInAppNotificationsState();This is documentation for Stream Chat React Native SDK v8, which is no longer actively maintained. For up-to-date documentation, see the latest version (v9).
useInAppNotificationsState
useInAppNotificationsState manages in-app notification state: open/close and the notifications list.
Best Practices
- Use this hook as the single source of truth for in-app notification state.
- Avoid duplicating notification lists in local state.
- Keep open/close actions lightweight to avoid UI delays.
- Limit notification list size for performance.
- Clear notifications when the user navigates to the relevant screen.