-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanded support for Svelte 5 #10761
Comments
@ThorFjelldalen since everything in the load function will need to be serialized if it runs on the server, I don't think that it makes a lot of sense to create $state in that function. |
@enyo Thank you for answering! Ah, I currently use CSR, and am not used to thinking in terms of SSR. But would this be any different to if we were to use the writable() stores, as we do in Svelte 4? The question concerns both this specific use case, but also the general use case of $runes in sveltekit ts-files. I'd think that it may be a valid use case at least in a CSR context? Would you happen to know if there is any documentation of best practices when using stores in a SvelteKit-app? I have a global store that is initialized by api requests, and thought that the +layout / +page load function was the natural location for this, as it is relevant to the entire application. |
is there a rough roadmap for making runes versions of the built-in stores? Would love to give all my stores the 🔪 when I migrate to runes but the built-in ones make reasoning about a proper refactor harder |
There is no roadmap and I don't think any planning will start until a while after Svelte 5 has released. |
there is a |
I wasn’t aware of the new
Could you elaborate on this one? Other than the route tied to a load function, which always had data on a prop, I didn’t think page data was available through $props anywhere else? Because that is my most used app store, but for the use-case of global data available anywhere down the tree (in components, child routes, etc) |
you are right, page data in $props is only available on the route itself. From my experience you can get pretty far with that, only reaching for the page store in situations where the prop isn't available (eg parent layout setting title with svelte:head to a value provided by child load) |
Describe the problem
Add support for Svelte 5 and runes: https://svelte.dev/blog/runes
Describe the proposed solution
At some point it'd be nice to have rune versions of the built-in stores
Maybe the types generation stuff could use some changes? @dummdidumm would know better about that...
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: