The SPA Dilemma

8 points by todotask ↗ HN
Before we enter 2023. We have React, Vue, Angular, Svelte, Solid.js and so on.

What will you choose for your productions and side projects?

17 comments

[ 2.8 ms ] story [ 50.0 ms ] thread
I'm going to try an end run around the dilemma and try htmx: https://htmx.org/
Combining htmx, _hyperscript, tailwind, and my preferred server side tech has really minimized the web ui friction for my projects. Good luck with the end run and I hope it works well for you too.
htmx + AlpineJS + tailwind is becoming a popular combo.
(comment deleted)
I use react, because that's what I'm best at, and I also use it in my day job. Also most jobs in react, so it makes sense for my cv too.
I use React at work for all our projects. We have yet to run into a situation where react has failed us. I’m sure many people can say the same about the other options. That is a clear indication that it doesn’t really matter which you pick. It should be based on team familiarity and then just comes down to personal preference.

Personally I think React/Vue/angular are the safe bets, in that order due to popularity

Rails, Turbo, and StimulusJS. SPA experience with 10% of the complexity and effort of using a FE framework.
Use the right tool for the right project:

- info-dump / static website: sever-side render everything, add JavaScript when needed

- app for specialized users: SPA probably (they're ok waiting for js to load if they're making money using the app)

- store-front / marketplace: A full stack framework like Next/Remix etc

I started last year , use angular at job and for side project
I am an outlier here but I will say Wt, a C++ web toolkit. It is like developing a desktop application, server-side rendered, works even if JavaScript is disabled on client side, and includes lots of features. The final web app too feels like a desktop app even though it is not an SPA. Some of the things it can do is shown here: https://www.webtoolkit.eu/widgets

The whole https://www.webtoolkit.eu website is written in Wt.

I’m going to continue to use react for pretty much everything. The beauty is you can use a consistent approach for building pages, along with a massive community. But unlike the React of 2016, you have many options for how to serve it. Single page app? Server rendered? Statically generated? Some combination? You can even build mobile and desktop apps with it (w/ react native).

There are many challenges with react. But once you become accustomed to it and it is your default way of working, it just makes sense to keep using it. It keeps getting improved and the ecosystem keeps evolving.

I use something that many people don't know about or aren't talking/posting about: JsRender/JsViews. https://www.jsviews.com

JsRender can be used client-side and server-side using Nodejs for rendering templates. JsViews adds observability (one-way or two-way) to JsRender on the frontend and requires jQuery (I like jQuery, it's overhead is minor ;-).

JsViews is intuitive, modular and extremely flexible and self-documenting in my opinion. JsViews does not include a router as there are so many different ways of doing routing and depends on your needs. The concept and syntax of converters is really cool too.

Blazor to be honest. I got burned bad by both Vue and React, and the constant changes on the "right" way of doing stuff.
Mind elaborate more on the problem? Technology can take years to mature.
HTML, CSS, and either JS, TS, or Rust/WASM as required for interactivity, depending on project complexity.
React w/ Next, so I can choose on a per-page basis whether I want a client-heavy SPA, statically generated page (SSG), or server rendered (SSR) and basically one click deploy.
There is so much cruft you need to write with all these frameworks these days. Use this, use that. Just tiring. I have moved away to Imba and am very happy with it.