Stores lag behind routes in SSR: intentional? #3209
-
I’m bitten several times by the serverside rendered lag in stores that happens when a store is set on a page, but is read by a component that's higher up in I made a minimal reproduction to show the issue:
Is this like it should work? If so: what is the recommended way to deal with this problem? I'm using stores for example to set |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
See #269 (comment) for more details about this. I think this limitation could be better documented. Probably the most immediate improvement here would be built-in support for metadata in SvelteKit, which is something we'd like to do |
Beta Was this translation helpful? Give feedback.
-
I’ve made a deployment of the reproduction for easier viewing: https://sveltekit-store-ssr.vercel.app/ |
Beta Was this translation helpful? Give feedback.
-
The solution we've come up with for this class of problem is #3252. Anything added to |
Beta Was this translation helpful? Give feedback.
See #269 (comment) for more details about this. I think this limitation could be better documented. Probably the most immediate improvement here would be built-in support for metadata in SvelteKit, which is something we'd like to do