@deltares/fews-web-oc-composables
@deltares/fews-web-oc-composables / useHostNotifications
Function: useHostNotifications()
useHostNotifications():
HostNotifications
Defined in: shared/hostNotifications.ts:77
Alpha
Retrieves the host notifications implementation that was previously provided via provideHostNotifications.
Returns
| Member | Type | Description |
|---|---|---|
addAlert | `` |
The host notifications implementation.
Throws
When no host notifications have been provided yet.
Example
ts
import { useHostNotifications } from '@deltares/fews-web-oc-composables'
const notifications = useHostNotifications()
notifications.addAlert({
id: crypto.randomUUID(),
type: 'success',
message: 'Saved successfully.',
})