You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current svelte implementation is using a global LL store, which is shared server side thus may cause inconsistent language with SSR.
As per sveltekit docs # avoid shared state stores should never be global (should not be exported in .ts and .js files), but the current code does so:
This is hard to reproduce consistently since it's a race condition (multiple requests with different languages at the same time).
The thing is, as per kit's docs, stores should not be global, so the bug is there as long as there is a global store being used.
Logs
No response
Config
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
cristovao-trevisan
changed the title
Sveltkit is using shared global store server-side
Sveltkit is using shared global store server-side (SSR)
Nov 1, 2023
Version
5.26.2
Describe the bug
Current svelte implementation is using a global LL store, which is shared server side thus may cause inconsistent language with SSR.
As per sveltekit docs # avoid shared state stores should never be global (should not be exported in .ts and .js files), but the current code does so:
There are two options to fix this problem that I'm aware off:
Context usage can also be simplified using components, for example:
Reproduction
This is hard to reproduce consistently since it's a race condition (multiple requests with different languages at the same time).
The thing is, as per kit's docs, stores should not be global, so the bug is there as long as there is a global store being used.
Logs
No response
Config
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: