svelte-toast icon indicating copy to clipboard operation
svelte-toast copied to clipboard

Send Updates/Events

Open skandabhairava opened this issue 2 years ago • 3 comments

How would I send custom events from my custom notification component, and how do I receive it from my main component? Thanks in advance!

skandabhairava avatar Jun 21 '22 13:06 skandabhairava

I mean, we can close the toast when u click on a button, and check if the toast has been popped from the main component, but is there a better way to do that where we can send multiple events??

skandabhairava avatar Jun 21 '22 13:06 skandabhairava

Yup, there are some use-cases (like event dispatching/forwarding) that will be better handled in the next major release. There's been tons of changes to Svelte, particularly in features and patterns, since this repo was first released. 😦

Meanwhile, does the onpop() callback help your use-case?

zerodevx avatar Jun 21 '22 15:06 zerodevx

Yup, it does satisfies my use case! Thanks a lot man :D

skandabhairava avatar Jun 25 '22 16:06 skandabhairava