The issue is that much of the time, people seem to choose tools based on convenience/past experience, not whether it's actually the right solution to their current issue.
Why Vanilla JavaScript
111–120 of 176 posts
Re: Why Vanilla JavaScript
#112Earlier quoted context omitted.
Your first thought might be to use React, but in prior eras we wrote a function updateFieldVisibility() and that worked fine. Straightforward code can be faster than using a state management framework to determine exactly which fields' visibility changed.
But it's harder to have component composition. Consider also lists and adding/removing items and so on, juggling all of it gets insanely complex and requires MVC or MVVM patterns like with backbone.js
Re: Why Vanilla JavaScript
#113Also with the developer disruption of agentic coding AI, the arguments for using vanilla JS is even stronger. Code reviews of code/solutions is much easier. Scoping of code paths for each server-side render templates is easier. The AI does all the boilerplate coding, while keeping it readable and debugable. Implementing design patterns is just common computer science stuff, and the coding agent is pretty good at it.
I also what to mention, as a business owner, and boss of a startup. All developers here work with vanilla javascript. They were first surprised, but today they prefer it by a huge margin because of the simplicity and zero dependency and non existing build steps. The web browser is the framework, you need another abstraction over the web browser.
Re: Why Vanilla JavaScript
#114Earlier quoted context omitted.
But it's harder to have component composition. Consider also lists and adding/removing items and so on, juggling all of it gets insanely complex and requires MVC or MVVM patterns like with backbone.js
But now we're back at "Not everyone is building complex UIs like google sheets". I agree with the underlying sentiment of this thread: overengineering is way more common than underengineering.
Re: Why Vanilla JavaScript
#115Earlier quoted context omitted.
Your first thought might be to use React, but in prior eras we wrote a function updateFieldVisibility() and that worked fine. Straightforward code can be faster than using a state management framework to determine exactly which fields' visibility changed.
it can be faster, but is it correct? React was invented because jQuery style state management collapsed into unmanageable code past a certain size
Re: Why Vanilla JavaScript
#116Earlier quoted context omitted.
As a user I don't really appreciate sites that do this as they tend to have worse latency for UI interactions and less pleasant page transitions. And of course, they are unusable offline
My sites with htmx have less latency for ui interactions and page transitions work like every page on the internet. As for offline, yeah, my Internet web page doesn't work offline. Shocker.
That's really too bad honestly. What about your users who want to use your site when they're offline? Sympathy with those users is why I made sure that my site works well when offline.
Re: Why Vanilla JavaScript
#117As for frameworks, we are not progressing towards AI-driven frameworks.
Re: Why Vanilla JavaScript
#118Earlier quoted context omitted.
Your first thought might be to use React, but in prior eras we wrote a function updateFieldVisibility() and that worked fine. Straightforward code can be faster than using a state management framework to determine exactly which fields' visibility changed.
But it's harder to have component composition. Consider also lists and adding/removing items and so on, juggling all of it gets insanely complex and requires MVC or MVVM patterns like with backbone.js
Re: Why Vanilla JavaScript
#119Re: Why Vanilla JavaScript
#120Earlier quoted context omitted.
>"frameworks scale and provide structure" Web Components and vanilla JS scale just as well. Been doing this for ages.
Asking in good faith: how is your experience working with vanilla JS on a team? While I’m not the biggest fan of Nextjs for my own solo projects, I really enjoy using it at work. Leaning into the opinionation it provides/encourages keeps my team from bickering too much about how to structure things. It’s really nice to say “this is the idiomatic way of doing it according to the docs” and for everyone to nod their hea…
Folks learn about how to use modules and libraries?