Angular vs. React vs. Vue (Part I: Hello, World!)

I’d worked with jQuery for years when AngularJS appeared and try to find its place in web developers’ toolbox. AngularJS is touted to be the framework to create a single-page application. Today, the latest AngularJS is known as Angular only (without the “JS”) and within the last decade, contenders such as React and Vue have sprung up.

In this series of articles, I’m comparing the learning experience among Angular (version 6.0.3), React (version 16.4.1), and Vue (version 2.5.16), from “Hello, world!” stage to a real-world application. Different aspects (documentation, beginner friendliness, ease-of-use) will be considered.

Hello, World!

Angular

Angular documentation (https://angular.io/guide/quickstart) walked through creating the “Hello, world!” example by using Angular CLI. Using Angular CLI required installing Node and NPM. Once that’s set up, I generated a new project by running an Angular CLI command. The command created a set of folders and files which made up an Angular app.

Default files and folders of an Angular app

The guide pointed the file to update (./src/app/app.component.ts) to print “Hello, world!” on the web page. To see the output, I needed to run another command, which would launch the server and open the web browser on a certain URL.

React

React’s website insisted that I play around with the example code on CodePen. But an online code playground spared me the setting up step, which was what I actually wanted to do. I managed to find a pre-made HTML file at https://reactjs.org/docs/try-react.html to set up on my local environment.

The guide did warn that the sample HTML file was not to be used in a production environment.

Vue

I was able to create a “Hello, world!” example based on the guide at https://vuejs.org/v2/guide/. The guide provided an example on JSFiddle, but it also gave direction on how to create the web page yourself. The guide mentioned of vue-cli (command line interface for Vue) but didn’t recommend it for beginners.


Angular’s “Hello, world!” definitely took the most effort to create since it necessitated setting up the Node and NPM before creating the app. And then using the CLI to create an Angular project could be intimidating for some Windows users.

React and Vue required only including, respectively, three and one JavaScript files in the HTML file. React syntax mixed an HTML markup (H1 tag) and content (Hello, world!) while Vue separated the two.

In part II, I’m comparing the use of list, conditional rendering, form, event handling, and component among the three frameworks.

“You must sign in or sign up to purchase this item.”

I was ready to purchase a new theme for my blog when I read the following: You must sign in or sign up to purchase this item. Ugh. Why?

I found the theme on a marketplace so I figured I could probably go the original theme author’s website and make my purchase there. I found the website, and the “Buy Theme” button which, sadly, led back to the marketplace.

Please, make it easier to purchase items from your store and I might purchase more.

Give What Users Want. Now.

YouTube used to display a bar chart to present the “likes” and “dislikes” of a video. What I would immediately see upon landing on the page was the proportion of site visitors who pressed the like and dislike button. But guess what I would immediately do? I would drag my cursor toward the chart and hover the cursor on top of the chart because that was the only way to see the actual number of “likes” and “dislikes.”

Statistics does not mean much without a good number of samples. I’m interested to see the numbers first. YouTube has since replaced the chart with the old school, straight up numbers. I suppose a user could infer the ratio of “likes” and “dislikes” himself.

Likes Statistics

Likes Statistics