Skip to main content

Hook useNotification

Arguments

ArgumentsTypeMeaning
---



Return

ElementTypeMeaning
addNotificationfunctionAdd notification
removeNotificationfunctionRemove notification by id

addNotification(obj)

ArgumentsType
titlestring
messagestring
typesuccess / danger / info / default / warning
durationduration

removeNotification(id)

ArgumentsType
idstring



Example

const { addNotification, removeNotification } = useNotification()