-
Hello, Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, there two ways you can achieve this.
const App = () => {
useEffect(() => {
// Dismiss all active toasts
toast.dismiss()
}, [currentRoute])
return ( ... )
} |
Beta Was this translation helpful? Give feedback.
Yes, there two ways you can achieve this.
Instead of adding
<Toaster/>
to the root of your app, you only add it to specific pages where you want toasts to appear.You dismiss all toasts on navigation. For example, this could be done with
useEffect
.