timolins / react-hot-toast

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

Add delay to toast #338

Open IamGideonIdoko opened 5 months ago

IamGideonIdoko commented 5 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.