Closed htmlsplash closed 5 months ago
I guess, looking at the current implementation this is probably not possible without significant re-write since the current implementation relies on a active web socket connection.
@htmlsplash This doesn't make a lot of sense. Pure SSR is a non-interactive static page, showing a toast is a interactive action. It just cant function in a non interactive page.
"showing a toast is a interactive action. It just cant function in a non interactive page." True, but you could drive it with purely javascript. We have this functionality in our Webforms app, is uses the original JS implementation of toaster and works identical to your version. Everything is done via JS. I guess your version is strongly tied to Blazor's interactivity model and would require re-write.
This library is for interactive Blazor applications, not static HTML pages (however they are generated). There are plenty of existing JavaScript libraries available for showing toasts. If I rewrote this library to just use JavaScript then all I would do is create yet another JavaScript toast library.
I believe there are Blazor wrappers for some existing JavaScript toast libraries so it might be worth you having a look for those and giving them a try.
Makes sense, thank you.
Is your feature request related to a problem? Please describe. The current toaster service only works with an active Web socket connection (interactive server model).
Describe the solution you'd like Make the IToastService api calls work without web socket connection so it can be invoked on an SSR page.