4 ms·
I love love love Svelte/Sveltekit. I am an experienced backend engineer and this is the first time I have worked in a FE framework that just clicked. What I li
by infecto 2y ago
I love love love Svelte/Sveltekit. I am an experienced backend engineer and this is the first time I have worked in a FE framework that just clicked.
What I like:
- Not a whole lot of magic syntax.
- The structure of files feels like I am building a backend app, its quite logical and easy to parse through.
- Easy to get up and running, I am sure the decisions exist but I struggle historically with all the sidecar products that can be added into the frontend framework.
- It combines the beauty of native JS/TS with svelte. I can hydrate a store with my own hand rolled api calls.
- There is not a whole lot going on from a API/user perspective. I have stores and routes which are built into the folder structure. I am sure there is more but that gets me to a useful MVP.
- miohtama 2y ago- No useHook() spaghetti
- husarcik 2y agoI agree with everything you highlighted! I'll add that my career isn't programming. However, Svelte let's me come back to my code base and understand everything, even after months. There is minimal framework related syntax to retain in my memory. Just have to know typescript well and that's it. Additionally, I don't need to retain all the rendering gotchas that other frameworks (eg, react) have. This has changed slightly with runes but I find them pretty easy to refresh on if I find im confused. For me, this trade-off is well worth the limited availability of third party libraries. I wish someone would create a Laravel-like extension for Sveltekit. If I could just pull in user login flows, hashing, mail, etc all from organized Laravel-like docs, Sveltekit would be perfect for full-stack.
- sureglymop 2y agoI love Svelte, Kit not necessarily. It's nice but a bit too magic for me. I wrote about this before but I find it weird to write a load function that gets transpiled into a server and a client version and having to use `browser` to check if running in a browser context. Well it's not necessarily weird but it is too magic for me, e.g. an if statement checking this would get compiled away iirc. On the other hand, I've been trying out astro with svelte and it's been super nice, especially with the ability to have runes in other typescript files.
- snapetom 2y agoI’ve been a backend and data engineer who got my start in full stack. I’m working on a project and selected Svelte for the front end after trying to learn React. I agree 100%. Svelte is great. Even 5 with its warts isn’t as bad as react. Kit on the other hand has been a major pain. You won’t need a webserver oh wait you do! You have to make drastic tradeoffs when choosing between full SPA and SSR render only. Server side pre-rendering seems like middle ground nightmare that I just I don’t think I can tackle sufficiently right now. I need to get an MVP. The (browser) issue is a symptom of this greater problem - it’s just not clear what runs on the server side and what doesn’t. The documentation is very poor on this and blogs are flat out wrong.
- benmccann 2y agoFiles with `.server` in the name run only on the server. The remaining files run on the client and server. This is mentioned in the introduction on https://svelte.dev/docs/kit/routing https://svelte.dev/docs/kit/routing What's confusing about this and what could we do to help?
- vergessenmir 2y agoIt's all kinda hidden. The documentation steers you towards SSR or assumes it. It appears as though you can't have client side routing without a roundtrip to the server. Take a looked at the "page" documentation immediately under Routing. How do I serve svelte files using a python or golang backend and still have client side routing? These should have a fairly straightforward answer but I don't think they do.
- snapetom 2y ago> or assumes it. I think this succinctly summarizes my gripes. The docs do generally make these assumptions, and are not clear when it's otherwise.
- benmccann 2y agoThe docs for single page apps live at https://svelte.dev/docs/kit/single-page-apps https://svelte.dev/docs/kit/single-page-apps By default, SvelteKit does SSR for the first page and client-side routing thereafter. This is fully configurable. Perhaps it's worth an additional mention on the routing page. I'll take a look later. Thanks for the suggestion.
- setheron 2y agoSame I just wrote about my experience here on a project https://fzakaria.com/2025/01/28/bazel-build-event-protocol-viewer.html https://fzakaria.com/2025/01/28/bazel-build-event-protocol-v...
- ChocolateGod 2y agoThe only "magic syntax" I wish Svelte would borrow from other frameworks is a <template> tag to surround the component, in similar to how it already has <script> and <style>. You can do this with preprocessors but having it built in would be golden. I like doing <script lang="ts"> blah </script> <style> blah blah </style> <template> blah blah </template>
- Sateeshm 2y agoIsn't <template> an HTML element?
- ChocolateGod 2y agoYes but apparently it's okay for Javascript to use it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template https://developer.mozilla.org/en-US/docs/Web/HTML/Element/te...
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]