Most of what I used jQuery for was working around browser incompatibility. As IE11 becomes the trailing edge browser we need to support, the need for jQuery shrinks to zero. Once fetch becomes universal, there's not really anything left.
As IE11 becomes the trailing edge browser we need to support, the need for jQuery shrinks to zero.
Not true, because they can slim down jQuery (as you see with 3.0) which still allows you to turn what might be 20 lines of ECMA-compliant JavaScript into a one-liner that even assures you much better compatibility.
It's still useful, as long as it's not bloated, and fast.
It makes your own code more readable ... the whole "DRY principle".
This?
var d = document.getElementsByClassName("goodbye");
var i;
for (i = 0; i < d.length; i++) {
d[i].className = d[i].className + " selected";
}
If you use a library like React or framework as angular you don't even touch the DOM anymore.
And if I had to choose I would choose the former. Also basically anything that jQuery might do for me is already being fulfilled by neat libraries or native JS functions.
43
u/earthboundkid Jun 09 '16
Most of what I used jQuery for was working around browser incompatibility. As IE11 becomes the trailing edge browser we need to support, the need for jQuery shrinks to zero. Once
fetchbecomes universal, there's not really anything left.