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:
|
const [store, setStore] = createStore<State>({ |
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.