[SSR] Library isn't compatible with SSR and shares its state between all the clients
Solid-toast creates a store in global scope which is literally just a global variable that's created only once on the server and being shared across all the clients afterwards:
https://github.com/ardeora/solid-toast/blob/9d2ce4f76c83ebe5d64602cf8164f60556615b68/src/core/store.ts#L4
Reproduction: https://stackblitz.com/edit/solid-ssr-vite-n1tsrb?file=src%2Froutes%2Findex.tsx,src%2Froot.tsx
- Open reproduction and wait till a toast is popped up.
- Update the page after this.
As you can see, a toast pops up immediately even though we have a timer set up for this. A toast will still be there even if you comment out this timer and update the page one more time.
I think it makes sense to leverage Context API here and create independent store for every provider, but probably this would require some breaking changes.
just stumbled over a similar issue. Are there any news about a possible fix in combination with SSR?