Hook to access the notification system. Uses the notifier from the nearest NotifierProvider, or falls back to the default ReactNotifier singleton if no provider is found.
The notification interface
function MyComponent() { const notifier = useNotifier(); const handleClick = () => { notifier.showMessage('Hello World!', { type: NotifierType.Success }); }; return <button onClick={handleClick}>Show INotifier</button>;} Copy
function MyComponent() { const notifier = useNotifier(); const handleClick = () => { notifier.showMessage('Hello World!', { type: NotifierType.Success }); }; return <button onClick={handleClick}>Show INotifier</button>;}
Hook to access the notification system. Uses the notifier from the nearest NotifierProvider, or falls back to the default ReactNotifier singleton if no provider is found.