React is the new jQuery
bradfrost.com
React is the new jQuery
1–10 of 206 posts
Re: React is the new jQuery
#2Re: React is the new jQuery
#3Let’s not forget that jQuery was a polyfill that allowed JavaScript Devs on all browsers to code to a common baseline. React is a nice —- and popular —- library for building UIs but it’s existence isn’t an indictment of the laziness of standards implementors for browsers (okay, IE mainly) and god-send to developers like jQuery was.
Re: React is the new jQuery
#41. Every document has a root node. is your root node now. You had a root node before, you have a root node now.
2. Do a search and replace. That's easy.
3. That's another search and replace.
4. You don't need to call a constructor, you don't need to use bind, and you don't need to assign your functions to an variable on your class instance.
React allows you to compose things. Make something once and use it everywhere. You write much, much less code. You get lifecycle hooks for when things mount, update, unmount. You get easy templating in JSX. You can also ditch the whole thing for Inferno if you care about having no lisence or company behind it.
You also get amazing libraries for state management and async via reactivex.
Re: React is the new jQuery
#5Oh Brad, you do not know what you are talking about right off the bat. Let's go through your list. 1. Every document has a root node. is your root node now. You had a root node before, you have a root node now. 2. Do a search and replace. That's easy. 3. That's another search and replace. 4. You don't need to call a constructor, you don't need to use bind, and you don't need to assign your functions to an variable on…
I can usually jump into someone's react code and get what's going on pretty quickly unless they did something really gnarly with incredibly nested props. Even then, at least I still know where to drill down. With jQuery soup, you didn't get that luxury.
Being able to have an entire team know how to build components and provide them with functionality is an incredible advantage. I don't love everything about react either, but the ecosystem, somewhat enforced convention, tooling, etc - it's worth it (so far).
I love some things about Vue, but it isn't a silver bullet either. Brad seems to be pretty butt hurt about react. If you've worked on a large team without something like react, then worked on one with react, it really shines. It's a major productivity booster.
It's not perfect, but it's very good.
Re: React is the new jQuery
#6With JQuery you're signing up for manual DOM manipulation. It's a challenge to scale that for what's now considered table-stakes for web apps.
Re: React is the new jQuery
#7Oh Brad, you do not know what you are talking about right off the bat. Let's go through your list. 1. Every document has a root node. is your root node now. You had a root node before, you have a root node now. 2. Do a search and replace. That's easy. 3. That's another search and replace. 4. You don't need to call a constructor, you don't need to use bind, and you don't need to assign your functions to an variable on…
You also get convention. jQuery didn't offer much of that once you started gluing its functions together... I can usually jump into someone's react code and get what's going on pretty quickly unless they did something really gnarly with incredibly nested props. Even then, at least I still know where to drill down. With jQuery soup, you didn't get that luxury. Being able to have an entire team know how to build compon…
jQuery + co. have very consistent "look and feel"
Re: React is the new jQuery
#8Earlier quoted context omitted.
You also get convention. jQuery didn't offer much of that once you started gluing its functions together... I can usually jump into someone's react code and get what's going on pretty quickly unless they did something really gnarly with incredibly nested props. Even then, at least I still know where to drill down. With jQuery soup, you didn't get that luxury. Being able to have an entire team know how to build compon…
jQuery had a lot of convention, for both it and it's plugins. jQuery + co. have very consistent "look and feel"
Re: React is the new jQuery
#9This is probably the only real concern I see.
jQuery is a library for DOM manipulation. It can co-exist with many other libraries.
React is an entire framework.
These days you need jquery less because browsers are more standards compliant and css animations basically work.
The trick is about using the right tool for the right job.
We have several large react applications - these are user-interaction heavy rich single page apps.
But we also use vanilla html and jquery dom manipulations in many other places.