Vue vs React: My Opinion after using both

By Samuel Muiruri | Dec. 20, 2018 | Opinion Piece


I’ve implemented a site that streams a list of jokes on both vue and react and here’s my opinion of both frameworks after using both.

First thing to note is React is owned by Facebook which runs on php, I believe that affected how it was developed because on React render returns html content, mainly a div with everything needed nested & rendered inside it. So mixing html and javascript might seem weird if you’re coming from a jQuery world where the framework is expected to query the dom and edit it as it pleases.

Diverting a bit to explain why these frameworks have over plain jQuery: in jQuery you can access practically any elements on the page and get content from it, be it a value from an input field or an attribute of a html element. Same goes for appending new html element, content and editing existing content on the page. Difference is normally jQuery dev’s likely when they need to know what’s going on will query the element on the page but with these frameworks there’s a variable that when updated updates any element on the page linked to it. You achieve something in jQuery with onclick and onchange handlers that update variables but the code will become more bloated the more complex your application becomes.

In php you have php code in-twined with html code, so for a php dev php code returning html is quite normal where as for django the template and views are different and renderers like jinja give a powerful way to get data to the template to render from within the template. Vue works similar to this so you don’t declare html elements from within the script but bind the script to the template.

That makes it easier to use it on an existing application without having to re-arrange the html templates.

React has the advantage that it also can be used to develop native android apps but in this case that’s not the intended use. Also on the documentation side Vue like boostrap seem to have a good idea of the what mainly web dev’s do and where both tutorial will get you from novice to intermediate easily Vue expects where you’re likely to need to use certain common features on the front-end development you’re likely to find examples on the left-side navigation.

So to recap this is my opinion: If you’re a php dev and a fullstack dev also maybe React will feel more comfortable but for Vue it makes it even more easier to separate between a front-end dev who works on the template and one who works on the scripts and as a django dev also I like the way Vue finds this is how things are normally done around here and plays along.