#786·sonner

`Toaster` 重装时会重新显示在卸载时仍然处于活动状态的 Toast,并无限期地持续显示 (2.0.7 → 2.0.8)

作者: takecchi创建于 2026年9月9日更新于 2026年9月9日

The Toaster replays every still-active toast to the new subscriber. If a Toaster unmounts while a toast is on screen, that toast is re-shown on every subsequent Toaster mount, and it never stops being replayed — the toast's auto-close timer lives in the Toast component, so it never runs while nothing is mounted, and the toast is therefore never marked as dismissed.

内容来源: emilkowalski/sonner