At the point that they chose to use all this kit and write "beautiful ES6". Write ES5, use a few polyfill functions, include the already minified mithril/vue/react js IF you actually are going to need dynamic DOM elements.
An XHR sweetener is included in mithril at least, but if not, it's only a few lines easily memorized, as you will do them constantly, it's also a good candidate for that library you should have made for all your projects by now, with that "byId()" and "byClass" shorteners etc... just an XHR you can pass a callback, url, and method to...
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
if(this.readyState == 4 && this.status == 200) {
//do stuff to your dom, JSON.parse(return stuff) etc.
}
}
xhr.open("POST", "/some route/" + whatever, true);
xhr.send();
FormData(); would add 2 more lines to the above...
I see no point in all this front-end toolchain stuff trying to maintain an illusion that ES6 runs in most browsers.
Invariably maintaining false abstractions will not promote deeper understandings of the rather essential and basic "request response" cycle of HTTP.
It's not even pretty. Classes in JS? Gimme a break.
Show me the ugly truth and K.I.S.S. because life is short and we have better things to do in life...
Well, either that or polyfill. Transpiling to JS may be a product of other motives (Typescript, Svelte, Elm etc.)
While Ruby is pretty and all, I don't find that I'm enjoying the lie that is ES6, and don't even get me started on classes in JS, etc.
Bottom line, JS isn't my favorite language, but I'm not dying reading/writing ES5, (nor does ES6 look lovely when I know that it's lying to me) and the advantages outweigh the disadvantages...
I'm questioning a lot of the group-think decisions.
> Transpiling to JS may be a product of other motives (Typescript, Svelte, Elm etc.)
I'm not sure what you mean. Are you saying those tools should be avoided too or are you saying they are an exception to the "avoid complexity" rule?
>While Ruby is pretty and all, I don't find that I'm enjoying the lie that is ES6, and don't even get me started on classes in JS, etc.
I don't understand what you mean. What does Ruby have to do with anything? Also, what do you mean by lie?
> Bottom line, JS isn't my favorite language
Ok. That's fine. So what?
> the advantages outweigh the disadvantages
Would you care to elaborate on this? What would you consider to the be the advantages and what makes the complexity disadvantage outweigh them?
> I'm questioning a lot of the group-think decisions.
What is there to question? Don't use tools just because other people are using them, when you encounter a specific problem you want to solve, evaluate the available tools for solving it.
> State management? What is "a variable"?
I'm not sure what you're asking here. Are you asking why people use state managers when building js applications on the web?
It's not even pretty. Classes in JS? Gimme a break. Show me the ugly truth and K.I.S.S. because life is short and we have better things to do in life...