Skip to content

docs: warn against mounting more than one Toaster - #376

Open
kesha-antonov wants to merge 1 commit into
gunnartorfis:mainfrom
kesha-antonov:docs/mount-single-toaster-note
Open

docs: warn against mounting more than one Toaster#376
kesha-antonov wants to merge 1 commit into
gunnartorfis:mainfrom
kesha-antonov:docs/mount-single-toaster-note

Conversation

@kesha-antonov

Copy link
Copy Markdown

Summary

Adds a short note to the README warning against mounting more than one <Toaster /> per app.

Why

While investigating what looked like a duplicate/ghost toast bug in #370, we eventually traced our specific repro to an app-level mistake, not a library bug: a second <Toaster /> was mounted inside an internal shared package alongside the app's own top-level one. Since the toast store is a shared, module-level singleton, every mounted <Toaster /> subscribes to and renders every toast() call - so this silently duplicated every toast instead of erroring or warning.

It's an easy trap in any codebase with independently-developed feature packages/providers, and the resulting symptom (toasts appearing to duplicate) looks confusingly similar to real animation/rendering bugs, so it's worth documenting explicitly rather than leaving it to be rediscovered by trial and error.

Test plan

Docs-only change, no code paths affected.

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for sonner-native ready!

Name Link
🔨 Latest commit 02a10c4
🔍 Latest deploy log https://app.netlify.com/projects/sonner-native/deploys/6a847ecf2b250c00081010ff
😎 Deploy Preview https://deploy-preview-376--sonner-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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