timolins / react-hot-toast

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

Redirect after error or success #274

Open renerlemes opened 1 year ago

renerlemes commented 1 year ago

Is possible to add a property in toast options with the name redirect and after show the loading notification, redirect to the page that was set in property and show success or error notification? I try to make this in a custom class, but I dont't have access to navigate inside the class.

Limitless-Kode commented 1 year ago

Maybe there could be a callback that triggers when the toast closes and you can handle what ever extra logic you want from there.