Hacker News new | ask | show | jobs
by dimmke 1118 days ago
I agree with you and I think this is by far the biggest risk to SvelteKit as a project. The biggest problem is that it’s very prescriptive for some things and then has no opinion (or even guidance) on other areas.

Like forms, the docs say use Form Actions, but it’s fundamentally at odds with being able to build a standalone component that can submit data to the server and be used anywhere. The workarounds are silly.

And then there’s how they treat navigation. Always use anchors! For progressive enhancement and preloading pages. Except you end up having to use their ‘goto’ method to do routing in a lot of circumstances. It’s very muddled and full of mixed messages.

1 comments

> And then there’s how they treat navigation

Yeah, and that awful file-based routing (IMO).

I feel that the strongly opinionated approach worked wonders for Svelte since the (let's call it) reactive components paradigms was well understood by then. But translating that approach to the backend has not been very successful because flexibility is paramount.

Yeah and the attitude towards suggestions is pretty poor. I’m in too deep to refactor right now, but Inertia looks like a good option eventually. Keeping the benefits of svelte while moving to a better backend. I’m glad it was posted.
What I did was integrating Svelte with Fastify.

Initially that required lots of custom stuff (before SvelteKit and Vite had SSR) but now it's fairly easy to integrate with Vite. I have this repo I used to experiment a bit with that.

https://github.com/PierBover/fastify-vite-svelte-template