Skip to main content
Version: 1.0.4

INotificationCenterHook

@spartanfx/react v1.0.4


@spartanfx/react / INotificationCenterHook

Interface: INotificationCenterHook

NotificationCenter hook return type

Properties

PropertyTypeDescription
addNotification(payload, options?) => Promise<void>Add a new notification
clear() => Promise<void>Clear all notifications
errorErrorError state
itemsINotificationItem[]Current notifications
loadingbooleanLoading state
markAllRead() => Promise<void>Mark all notifications as read
markRead(id) => Promise<void>Mark notification as read
refresh() => Promise<void>Refresh/reload notifications
remove(id) => Promise<void>Remove a notification
unreadCountnumberUnread count