Earlier quoted context omitted.
Sure, and if you like working with the conventions and abstraction Rails offers that's great. Other people make different choices. That doesn't mean they're wrong.
To write good React you have to follow conventions, too. You can't get away from conventions. People keep touting react etc but I swear every mobile ordering app I use lags like hell, just from recent example, and these can easily be built and maintained without a huge framework to "manage state" or "connect state to the view".
Why Vanilla JavaScript
81–90 of 176 posts
Re: Why Vanilla JavaScript
#82Labeling UI frameworks as artificial complexity is simply a sign of inexperience manifested as NIH syndrome. The vanilla approach is fine for a personal or toy project, but it's an unmitigated disaster for a project with even a moderately complex UI. Eventually, the vanilla project becomes its own bespoke UI framework with a bunch of poor design choices because all the complexity that was dismissed as "artificial" ev…
React’s complexity isn’t just components — it’s effects, state‑management conventions, data‑loading patterns, and the surrounding build ecosystem. If your UI doesn’t need those abstractions, adopting them early is pure overhead.
For these kinds of projects, React usually carries a much larger total cost than vanilla HTML + JS.
The “vanilla becomes a bespoke framework” claim assumes the UI will inevitably grow until it needs framework‑level abstractions. Most UIs don’t. React front‑loads complexity even when the UI is small, while vanilla only adds what the actual requirements demand.
A few helpers aren’t “reinventing React” — they’re choosing a simpler design avoiding numerous unnecessary abstractions, and with lower costs & complexity for the moderate apps they're building. It's a very valid architectural choice.
Re: Why Vanilla JavaScript
#83Re: Why Vanilla JavaScript
#84I use Svelte 5 (without SvelteKit) for my SPA's, after doing my first SPA in vanilla JS. Then I discovered Svelte. Svelte is very close to the platform and still solves a lot of problems: for reactivity, modularity and CSS cascading (and in version 5 it is not too "magical"). A lot of the critique of frameworks in this article does not apply to Svelte.
Re: Why Vanilla JavaScript
#85Earlier quoted context omitted.
Not everyone is building complex UIs like google sheets. Most people are building static pages with a sprinkle of interactivity, or maybe form pages for doing CRUD.
It starts as simple crud, but then product introduces a business rule where some fields need to be hidden when another option is selected somewhere. O, but not when this checked, etc. Having a reactive framework when this happens is very much needed to keep all these effects working without a lot of vanilla JS. This can be solved later, but is a lot harder when you have an entire application that needs to bee kept wo…
In that case, the backend will likely have a class instancr representing it, with the first field being a discriminator on the class and the remaining fields being the details. And regardless of what the frontend does, the backend will revalidate always because you can never trust data sent from a frontend.
All that to say, maybe the form could be server side rendered, with an adaptor to convert a class definition into an html form fragment, and either embedding the js "rules" into the html itself, or making it a web component for containered usage.
Doing it this way is a big deviation from the current status quo, but I've found it to work very well and cut out a whole range of bugs. Plus it makes me think about what is truly client side state (no chance of staleness) vs server state cached in client to avoid repeat server calls (could be stale, leads to bugs).
Re: Why Vanilla JavaScript
#86A bit tired to see this...
No it's not. We do this all the time. It's as simple as using proper HTTP headers for your css/js/pictures/whatever. You can even have smooth page transitions now.
Re: Why Vanilla JavaScript
#87You don't need React: creating a minimal UI library:
Re: Why Vanilla JavaScript
#88Labeling UI frameworks as artificial complexity is simply a sign of inexperience manifested as NIH syndrome. The vanilla approach is fine for a personal or toy project, but it's an unmitigated disaster for a project with even a moderately complex UI. Eventually, the vanilla project becomes its own bespoke UI framework with a bunch of poor design choices because all the complexity that was dismissed as "artificial" ev…
Regarding puzzling design choices, I am wondering at the preponderance of data attributes like For custom web components, maybe the author forgot that you don't need to prefix attributes with data ?
Re: Why Vanilla JavaScript
#89I use Svelte 5 (without SvelteKit) for my SPA's, after doing my first SPA in vanilla JS. Then I discovered Svelte. Svelte is very close to the platform and still solves a lot of problems: for reactivity, modularity and CSS cascading (and in version 5 it is not too "magical"). A lot of the critique of frameworks in this article does not apply to Svelte.
How so? Svelte provides a bunch of (very nice, no doubt) abstractions for building web UIs, and there's a build step. In that regard, Svelte is no different from other JS frameworks.
Re: Why Vanilla JavaScript
#90Regarding Vanilla JS, You don't need React: creating a minimal UI library: https://pedroth.github.io/?p=post/NoNeedReact