fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.27k stars 673 forks source link

Hide toast instantly without showing them and add them to notificationcenter #1076

Closed C3ntraX closed 3 months ago

C3ntraX commented 3 months ago

Do you want to request a feature or report a bug?

Is it possible to create and hide a toast instantly without them showing up?

I need this behaviour because if I use the new useNotificationCenter and have the popover open, then I don't want the toasts to appear, instead they should appear directly into the popover/notificationcenter.

What is the current behavior? I don't know if this is possible, I didn't find any api/expample and my tests did show the toasts for a short moment which is not that great

What is the expected behavior?

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

fkhadra commented 3 months ago

Hey @C3ntraX , the notification center expose an api to add a toast to it without displaying one https://fkhadra.github.io/react-toastify/addons/use-notification-center#add