Live data from Hacker News

Thoughts on Svelte(Kit), one year and 3B requests later

claudioholanda.ch

11–20 of 222 posts

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#11

You need very strong argument not to take the most popular technologies these days. I don’t hear any arguments against react here strong enough to justify not choosing VueJS or React. It’s not in the interests of your client.

There are plenty other articles for them. Not every alternative article has to denigrate the incumbent.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#12

You need very strong argument not to take the most popular technologies these days. I don’t hear any arguments against react here strong enough to justify not choosing VueJS or React. It’s not in the interests of your client.

Standards-based is really the only thing that challenges react these days, i.e. raw JS with es modules, web components, and no build step/bundling. It only works in certain situations though, but when it does work, it's so much better than the giant web of black boxes and indirection that is the React universe.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#13
> by wrapping a vanilla lib to a component or an action, you’ve essentially created basic Svelte version of that lib

This is the key to making framework churn go away. The DX of using vanilla JavaScript is getting better every day. And is a much better experience than it was a decade ago.

> Islands architecture and partial hydration can help you render static HTML with just a small portion of JavaScript for those components who need it

I'm doing this with Hugo for rendering the static parts, and htmx for loading hydrated partials. The HATEOAS approach simplifies state management in the application. There is no client side "routing", just links and the back button.

In addition to vanilla libs, I include one "app.js" bundle. This file is created with esbuild and linted with deno. My "business logic" can be written in TypeScript in VSCode with the Deno extension and LSP server.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#14
post #3

Lost me at building a custom CMS for the MVP, or did I misunderstand?

Nope, that's my feeling too. Somehow for a news site mvp in 2023 we still reinvent the wheel.

It was a replacement for an existing website (requirements are well known), so a custom CMS being part of what they were hired to build and an MVP of that CMS being what they're talking about isn't so irrational.

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#15
post #6

As the author states, ... Svelte Stores are rough. Beyond just missing usage patterns and documentation, we found that several features are lacking, especially when used with native reactivity (`$:`). Another area lacking is TypeScript support. Our frontend codebase at OKcontract is implemented with Svelte, but we had to build some low-level libraries (including a wholly new implementation of Stores) to make it worth…

stores are nice (i’ve found the transitions especially useful) but very much optional. i’ve used redux with svelte with good results and as the article says, it’s easy to get svelte to work with any pure js libraries

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#16
post #3

Lost me at building a custom CMS for the MVP, or did I misunderstand?

Nope, that's my feeling too. Somehow for a news site mvp in 2023 we still reinvent the wheel.

It's a storied tradition.

(I know that at least Django was written for a news site)

Re: Thoughts on Svelte(Kit), one year and 3B requests later

#20

You need very strong argument not to take the most popular technologies these days. I don’t hear any arguments against react here strong enough to justify not choosing VueJS or React. It’s not in the interests of your client.

Standards-based is really the only thing that challenges react these days, i.e. raw JS with es modules, web components, and no build step/bundling. It only works in certain situations though, but when it does work, it's so much better than the giant web of black boxes and indirection that is the React universe.

> Standards-based is really the only thing that challenges react these days

I feel like Vue would be a better fit for this role, especially since now they have a Composition API that's as pleasant to use as React, except that they do lifecycle hooks better than React (no messing about with dependency arrays): https://vuejs.org/guide/extras/composition-api-faq.html

There's also Pinia which is a lot simpler than trying to use Redux, it's closer to MobX: https://pinia.vuejs.org/

There are also plenty of component libraries, like PrimeVue: https://primevue.org/

Seriously, the only actual complaint I have about Vue is that the 2 to 3 migration wasn't all that pleasant (albeit not as painful as what Python dealt with hah).

Oh and for more complex use cases (like what Next provides), there is Nuxt: https://nuxt.com/

Post reply on HN