Call it to create a notification from anywhere, even outside React. Make sure you add the
<Notification/> component to your app first.
#Available Notification options
You can provide NotificationOptions as the second argument. They will overwrite all options received from
#Creating a notification
This shorthand is useful for mapping a promise to a notify. It will update automatically when the promise resolves or fails.
A custom notification used in user confirmation dialogs. Can be helpful for asynchronous operations.
#Dismiss notification programmatically
#Dismiss all notifications at one
#Update an existing notification
#Render JSX custom content
You can provide a React component instead of text.
You can also supply a function that receives the notification as an argument, giving you access to all properties. This allows you to access the notification id, which can be used to add a dismiss button.
Under the hood, we are using react-hot-toast for our notifications UI.