Function useNotifications
- useNotifications(): {
channels: NotificationChannel[];
notification: Notification;
scheduleNotification: (
content: NotificationContentInput,
trigger?: NotificationTriggerInput,
) => Promise<void>;
watchBackgroundNotifications: <DataNotification = any>(
handler: (message: RemoteMessage) => Promise<DataNotification>,
) => void;
watchForegroundNotifications: <DataNotification = any>(
listener: (message: RemoteMessage) => DataNotification,
) => () => void;
} Returns {
channels: NotificationChannel[];
notification: Notification;
scheduleNotification: (
content: NotificationContentInput,
trigger?: NotificationTriggerInput,
) => Promise<void>;
watchBackgroundNotifications: <DataNotification = any>(
handler: (message: RemoteMessage) => Promise<DataNotification>,
) => void;
watchForegroundNotifications: <DataNotification = any>(
listener: (message: RemoteMessage) => DataNotification,
) => () => void;
}