fkhadra / react-toastify

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

Is there a global way to disable/enable notifications #1009

Closed Teco-Station closed 8 months ago

Teco-Station commented 8 months ago

Hi there, I was trying to find a way to global-enable or disable the notifications for the user could have an option to keep the screen clean when there were too many pop-ups. I know there are ways to achieve this while a global switch under ToastContainer is probably the most straight one, e.g. <ToastContainer enable={false}>, just for a suggestion :)

fkhadra commented 8 months ago

Hey @Teco-Station, this one can be implemented on the user land. You could use a state to conditionally display the ToastContainer.