Hacker News new | ask | show | jobs
by mattmanser 3584 days ago
Using vanilla js is still a massive pita even with ES6.

Nowt's going to beat $(".thing") vs:

    document.getElementByClassNameWhichWordsDidIForgetToCapitalizeThisTimeManVanillaJavascriptSucks
Or

    document.querySelectorWhoopsNoIMeantQuerySelectorAllGodVanillaJavascriptSucks
Design by committee, you get crap. Ease of use is incredibly important. And don't even get me started on on the fly dom manipulation, vanilla js really sucks for that.

    let div = document.createElement("div");
    div.iMAlreadyBoredTyping = "Yes";
    node.appendChild(div);
vs

    $(node).append($("<div>").data("quick", 1"));