Skip to main content

Notifications

In-app notifications list, push notifications (local reminders and server push), and a shared notification hook for permission and listeners.

Location

  • src/core/hooks/useNotifications.ts — Shared hook for permission, listeners, cold start, push sync (used by App, PermissionsPrompt).
  • src/features/notifications/api/notifications.service.ts, push.service.ts
  • src/features/notifications/domain/notifications.store.ts
  • src/features/notifications/ui/ — NotificationsListScreen

Shared hook: useNotifications

  • Purpose: Single place for notification handling (local and server). Used in App for listeners and permission prompt.
  • Options: onNoteIdFromNotification, userId, appIsReady
  • Returns: permissionStatus, requestPermission, ensureChannelForReminders, showPermissionPrompt, setShowPermissionPrompt

Screens

ScreenPurpose
NotificationsListScreenList of notifications, mark read
Settings > NotificationsPush toggle

API

  • notifications.service — Fetch notifications, mark read.
  • push.service — Expo push tokens, enable/disable, sync token to backend.

Domain

  • notifications.store — Notifications list, unread count; used by UI and tab badge.