News for hackers. Stuff that matters.
Re:Thoughts on Svelte by synergy20 on Monday March 27, 2023 @11:15AM (#35327778)
I used Vue in the past and decided to use Svelte early this year, I do not need SEO or anything SSR, just the original SPA with CSR.

then I found out Sveltekit is really a SSR-first design, and Svelte itself has no client side routing etc. While Vercel sells Sveltekit(and Next.js) to be CSR ready, I don't buy it, I don't need the complexity of SSR in the code when I just need a clean CSR, however you paint the SSR-is-for-all picture.

So I switched to React, now React is also favoring SSR-first(next.js etc) approach. I'm back to Vue for future projects.

Vue by default remains to be the sole and true CSR SPA, if you need SSR, add Nuxt will do, but, at least it does not force me into a SSR-first default (and recommended) framework.

Re:Thoughts on Svelte by sonicgear1 on Monday March 27, 2023 @11:41AM (#35328123)
We had the same problem. Svelte would have been perfect if it only had a true SPA router. SvelteKit is too complicated for a simple SPA.
Re:Thoughts on Svelte by pcthrowaway on Monday March 27, 2023 @12:00PM (#35328341)
I used https://github.com/EmilTholin/svelte-routing with great success, though it looks like the maintainer has recently stopped maintaining it, and recommending sveltekit.

Still, I'd give try, it looks like people are still using it, and perhaps someone else will pick up the burden of maintenance, since there's clearly a ton of demand: https://github.com/EmilTholin/svelte-routing/issues/236

Re:Thoughts on Svelte by synergy20 on Monday March 27, 2023 @01:30PM (#35329607)
https://github.com/ItalyPaleAle/svelte-spa-router seems good too.

but it's not official, and Svelte project seems careless for client routing, instead it tries to convince everyone use its SSR-first kit, that "can do CSR too", which means you have to carry the whole SSR code base and its documentation into your CSR project totally unnecessarily.

I get it Vercel needs SSR for its business, I don't get it why it keeps selling everyone that "my SSR-first framework is great for CSR SPA too", it is NOT, not at all.

Re:Thoughts on Svelte by bananapub on Monday March 27, 2023 @11:29AM (#35327980)
This is a pretty bizarre comment, given svelte isn’t intended to be a web framework and sveltekit makes it extremely simple to do client side rendering.
Re:Thoughts on Svelte by synergy20 on Monday March 27, 2023 @01:16PM (#35329396)
"extremely simple"? I disagree. I had to read its document and most of them are unrelated to CSR, why do I need to do that? the kit by design is absolutely SSR-first, it does let you tweak for CSR, but I don't need that complexity, not at all.

If Svelte provides a built-in client side router, and do not try to point everyone who wants to use Svelte to Sveltekit, I may reconsider, for now, Svelte is no longer in my projects.

Re:Thoughts on Svelte by markjaquith on Monday March 27, 2023 @12:21PM (#35328610)
You can totally use SvelteKit without SSR.

https://kit.svelte.dev/docs/single-page-apps

Re:Thoughts on Svelte by ttfkam on Monday March 27, 2023 @12:50PM (#35329007)
+page.js: export const ssr = false;

https://kit.svelte.dev/docs/page-options#ssr

I don't get why so many people seem to think SvelteKit is SSR-only or that it's some kind of Rubik's Cube of configuration to disable.

FYI: There's also export const prerender = true;

https://kit.svelte.dev/docs/page-options#prerender