Skip to main content

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

PropertyTypeDescription
notificationsActivity[]An array of activity notifications.
shouldLoadMoreNotificationsbooleanA flag indicating if more notifications should be loaded.
notificationCountnumberThe total count of notifications.
getNotifications() => Promise<void>A method to fetch notifications.
usersRecord<string, User>A record of users keyed by their IDs.
handleNotification(id: string) => voidA method to handle a notification by its ID.

Example

For example implementation, checkout here