@magicbell/react-headless
Version:
Hooks to build a notification inbox
20 lines (19 loc) • 581 B
TypeScript
import { NotificationStore } from './useNotifications.js';
interface useBellArgs {
storeId?: string;
}
/**
* Hook to get a notification store to be used in a bell.
*
* The `markAllAsSeen` function exposed by this hook does not update the fetched
* notifications.
*
* @param props
* @param props.storeId Optional ID of the notifications store
* @returns A store of notifications (if the store exists)
*
* @example
* const { unreadCount, markAllAsSeen } = useBell();
*/
export default function useBell({ storeId }?: useBellArgs): NotificationStore | null;
export {};