useAppNotifications is the primary hook for building a notification feed. It loads notifications, tracks the unread count, handles pagination, and exposes actions for marking notifications as read.
Basic Usage
Parameters
Number of notifications to load per page. Defaults to
10.Optional map of display text templates for each notification type. See Notification Templates.
Returns
The list of notification records. If
notificationTemplates is provided, each notification is augmented with a title and/or content field derived from the template.The total number of unread notifications for the current user.
true while a fetch is in progress.true if there are more notifications to load beyond the currently loaded set.Increments the internal page counter, triggering a fetch of the next page and appending results to
appNotifications.Marks a single notification as read. Applies an optimistic update immediately before the API call.
Marks all of the current user’s notifications as read. Applies an optimistic update immediately.
Clears the current notification list and re-fetches from page 1. Useful for pull-to-refresh.
The hook is backed by Redux. Notifications are shared globally in the Redux store — multiple instances of the hook in different components will share the same state.
Related
- Notification Templates — customize display text per type
- useAppNotifications hook reference

