useLMFeedNotification
Introduction
The useLMFeedNotification
is a custom hook that provides an easy way to manage and display feed notifications within your application. It helps you subscribe to notification events & handle notification data. This hook simplifies the process of integrating feed notifications.
This expects an instance of LMFeedCustomEvents
and NotificationsCustomActions
Property | Type | Description |
---|---|---|
notifications | Activity[] | An array of activity notifications. |
shouldLoadMoreNotifications | boolean | A flag indicating if more notifications should be loaded. |
notificationCount | number | The total count of notifications. |
getNotifications | () => Promise<void> | A method to fetch notifications. |
users | Record<string, User> | A record of users keyed by their IDs. |
handleNotification | (id: string) => void | A method to handle a notification by its ID. |
Example
For example implementation, checkout here