Re:Ask HN: What happened to vanilla HTML/CSS/JS development?
by gremlinsinc on Friday September 09, 2022 @05:51PM
(#32785343)
okay, sure you did it.. congrats... but I could do in much less work/lines of code the same:
see: https://jsfiddle.net/patrickcurl/zoastuLr/11/
html: 104 lines css: 39 lines js: 62 lines.
The major difference is I can easily 'read' and understand and 'grok' what my code is doing, yours needs more brain power to tie everything together. The majority is layout, css, etc.
Sure vue/react are overkill but alpinejs, etc makes closer to vanilla options viable that still at least have some eye-candy/syntactical-sugar that makes coding sweeter. But, I hate ugly code - I'll abstract away ugly code just to have code that's self-documenting and easy to understand.
Client side frameworks are still missing it, however, when it comes to: 1. Supporting persistent client side state 2. Syncing local state to the server and back 3. Variation of (2) but collaborative state
Aside -- Reactivity could be straightforward in vanilla js with some tweaks to event handling and in-browser support for dom diffing. I made this reactive vanilla js todomvc in ~200 sloc to explore the idea: https://tantaman.com/2021-02-12-Todo-MVC.html