Skip to content

fix: Prevent duplicate toasts with same text#686

Open
pimmee wants to merge 2 commits intoemilkowalski:mainfrom
pimmee:feat/prevent-duplicate-toasts
Open

fix: Prevent duplicate toasts with same text#686
pimmee wants to merge 2 commits intoemilkowalski:mainfrom
pimmee:feat/prevent-duplicate-toasts

Conversation

@pimmee
Copy link

@pimmee pimmee commented Sep 11, 2025

This PR changes so that duplicate toasts with the exact same (string) text are not shown.

While it could be opt in via a preventDuplicate option or similar, I can't think of any use case where you would want to display multiple toasts with exact same message, so making this default like other libraries such as notistack makes sense IMO.

Note: A more advanced solution could be implemented to also compare non-strings, but most toasts are string messages anyway so this is good enough IMO.

@vercel
Copy link

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sonner Error Error Feb 15, 2026 4:32pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments