UNPKG

@magicbell/react-headless

Version:

Hooks to build a notification inbox

13 lines (12 loc) 460 B
import INotification from '../types/INotification.js'; /** * Hook that is ran when the component is unmounted. By default marks a * notification as seen. * * @param notification The notification * @param fn Callback function to execute when the component is unmounted * * @example * useNotificationUnmount(notification); */ export default function useNotificationUnmount(notification: INotification, fn?: (notification: INotification) => void): void;