Why React Is My Favorite Front End Framework

Why is JavaScript so important?

When I started programming, JavaScript was one of the first languages that I learned. Together with HTML and CSS, it allows for the creation of dynamic webpages. Without JavaScript, webpages would be mostly static; you’d have to reload the page to see any updates after submitting a form or clicking a button. Animations would still be possible through CSS, but they wouldn’t be as interactive.

What Did We Have Before React/Vue/Angular?

Because there are so many browsers and each one has a slightly different implementation of technologies that power websites, and because the API required to interact with the page or DOM (Document Object Model) is somewhat cumbersome, jQuery was created. With jQuery, web developers could just include a script that allowed them to easily traverse the HTML, modify items, make asynchronous requests, update the page, and so much more! jQuery’s popularity exploded in the early days of the web.

The death of jQuery $

And then like most technologies, it died. Well not really, it’s still used to power 77.8% of the top 10 million websites [1]. As you can see jQuery is far from dead, but if you search job postings, you’re not likely going to find any that are requiring that you know it. Why? Because newer technologies like React and Vue have taken over the scene. 

The rise of React (and others)

While jQuery was something that you could sprinkle into your webpage to create a dynamic site, React and Vue are libraries that allow you to build reusable components in JavaScript that are then used to produce a mixture of HTML and JavaScript that runs in the browser. But why just stop at the browser? React and Vue can both produce cross platform mobile apps as well as desktop apps.

Which is better?

Nobody can really say that one is better than the other. In the end they essentially do the same thing. They have slight variations on how they achieve that though. For instance, Vue and Angular require using directives–special tags in html–that incorporate control blocks or loops. In React, it feels more like a mixture of JavaScript and HTML. With the creation of JSX–JavaScript disguised as HTML tags that are transpiled to JavaScript–one can create components that return a block of HTML looking code that has JavaScript within it.

One compliment I have about Vue is that because Vue components separate out template, logic, and style so they can look neater. React components incorporate the logic and presentation in the same component, though you can extract reusable logic into hooks and repeated code into smaller components to make React look neater too. 

My Favorite

So, If React, Angular, and Vue are essentially the same, why is React my favorite? Because it’s the one I have most experience in and the one I feel most comfortable with 😎

Which should you choose?

From a job outlook perspective, I think it makes more sense to hone your React skills, it seems to be much more prevalent. But you can achieve the same results with either, so if it’s a personal project I would choose the one I’m most comfortable with or the one I like best. 

Citations

  1. “Usage Statistics and Market Share of JavaScript Libraries (February 2020)”W3Techs. February 21, 2020. Archived from the original on February 21, 2020. Retrieved February 21, 2020
Print Friendly, PDF & Email

Leave a comment

Your email address will not be published. Required fields are marked *