wobsoriano / svelte-sonner

An opinionated toast component for Svelte. A port of @emilkowalski's sonner.

Home Page:https://svelte-sonner.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delay toast presentation until Toaster is mounted

justinkwaugh opened this issue · comments

Currently if I have an error in a +page.ts load function I might want to show a toast, but I cannot call toast() there because the Toaster component may not yet be mounted. It would nice if calls to toast() prior to Toaster being mounted would be cached and then run onMount within the Toaster component.