Closed nickyhajal closed 1 year ago
In general, if it's possible in react-hot-toast, it should be possible here. Each of the toast functions returns a toast ID that you can use to update or dismiss it. You should be able to do this (straight from the react-hot-toast docs):
const toastId = toast.loading('Loading...');
// ...
toast.success('This worked', {
id: toastId,
});
Let me know if that doesn't work for you!
Is there any way to get a reference to an existing toast if visible and update it directly?
If someone saves several times, I'd love to show some kind of feedback in the existing toast instead of showing 4 in a row of the same thing.