Closed GreyXor closed 2 days ago
Hey this is something previously discussed in #4.
Due to the nature of how snackbar works it can't be used within composable or plugins.
This probably applies to other snackbar packages too. Atleast I have tried primevue and I can't do similar things as you mention with their toast.
But you could try the same thing as mentioned in #4 , maybe using it like
onMounted(() => {
snackbar.add({
type,
title,
text,
});
});
Hi, thanks for your fast answer.
With https://vue3-toastify.js-bridge.com/ it works as expected even in plugin. I will check with onMounted().
Hmm, I'll take a look into this asap. Maybe turn that into a module too. Looks good.
Hello
sse.client.ts
In this code, a notification should be triggered each time I got a message from evtSource (what can happens in any time during my app running).
snackbar works in other places in my vues files, but here in this plugin, I can't send notifications because I got this error : Uncaught Error: No Snackbar provided! Any idea ? thanks