timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.85k stars 331 forks source link

Add delay to toast #338

Open iamgideonidoko opened 10 months ago

iamgideonidoko commented 10 months ago

It'll be nice to delay a notification from being triggered. A use case is when a notification is to be triggered after a timer is done.

While it's possible to use setTimeout and call toast after the timer ends, it'll be impossible to cancel the toast before the timer ends since the toast ID won't be available until the timer ends.