- Move
ToastContainerandToastQueueimports from@react-spectrum/toastto@react-spectrum/s2. - Keep a shared
ToastContainermounted near the app root or test harness, then update all queue calls to use the S2 import path.
- S2 supports
ToastQueue.neutral,positive,negative, andinfo. - Re-check options such as
timeout,actionLabel,onAction,shouldCloseOnAction, andonCloseafter the import move. - The queue methods still return a close function. Keep programmatic dismissal logic when the existing UX depends on it.
- Search for every
ToastContainermount and everyToastQueueusage after moving imports. Shared app roots, secondary entrypoints, and test harnesses are easy to miss.
- Update every toast mock to point at
@react-spectrum/s2. - If a test mounted
ToastContainerfrom the old package, swap it to the S2 import as part of the same change. - Re-run the affected tests after the import move. Toast helpers are often mocked in many files and are easy to miss.