const { openInAppNotification, closeInAppNotification, notifications } =
useInAppNotificationsState();This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
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.