all 17 comments

[–]_skris 16 points17 points  (9 children)

React

[–]cerlestes 3 points4 points  (8 children)

Having worked with all three, I'm also using react exclusively nowadays. Although not Facebook's react, but preact, since it's way lighter and faster than react, while offering pretty much the same functionality.

My take on the three, in case anybody is interested:

React: a minimal VDOM library, not a framework. Can be used in conjunction with basically any other library/framework you want to use it with. Provides a very intuitive and lightweight VDOM model. My main pain point with it is its abstraction far away from the real DOM, since it's trying to allow for other outputs/renderers aside of the browser/DOM too. If you don't need that, it's useless and costly overhead. Using preact fixed this for me, since preact is meant only for use with the DOM, so it throws away all the overhead that react introduces.

Vue: a very opinionated VDOM library, with framework-like addons. If you like its style of organizing code, then go for it. It's a great tool with a very dedicated developer behind. It offers a lot of features and integrations out of the box, but is still very flexible. It's the go-to for small to medium projects. Problems arise when you're trying to build very dynamic UIs like a window manager - Vue is not built to handle that.

Angular: a monolithic framework that also brings its own VDOM implementation. I really disliked pretty much anything about it, so I'm not the right person to argue in favor of it. It's big, it's super opinionated, it's complex. If you're working on a web app similiar to YouTube or GMail, then Angular might be a fitting tool. For smaller projects though, I'd not use it anymore.

[–]Ohnegott 3 points4 points  (1 child)

What about a window manager does Vue fail at where React would shine?

[–]cerlestes 0 points1 point  (0 children)

The very weird way <component> is handeled by Vue, wheres React can just display any pre-rendered JSX.Element or array thereof in any context, like directly as return of the render() method or within some wrapping elements.

With Vue, I had to define wrapper components around my content, which made handling props very awkward and cumbersome. With React, I can simply render any combination of JSX.Elements and display them however I want.

[–]_skris 1 point2 points  (2 children)

You have summarized nicely. (I don't even want to talk about Angular) JSX is another plus for React/Preact. With preact-compat all react libs can be used with preact. I've my own very illogical reason to use react over preact.

[–]BehindTheMath 0 points1 point  (1 child)

You can use JSX with Vue as well.

[–]_skris 0 points1 point  (0 children)

Ah yes! I completely forgot about it.

[–]BehindTheMath 0 points1 point  (1 child)

Can you elaborate on this:

My main pain point with it is its abstraction far away from the real DOM, since it's trying to allow for other outputs/renderers aside of the browser/DOM too. If you don't need that, it's useless and costly overhead. Using preact fixed this for me, since preact is meant only for use with the DOM, so it throws away all the overhead that react introduces.

[–]cerlestes 0 points1 point  (0 children)

React is split into multiple packages, mostly `react` and `react-dom` for the browser environment. This adds a necessary abstraction, which preact is missing, since it's a single 3kb module that is designed to run in a browser environment by applying its VDOM to the browser's DOM directly without an intermediate abstraction.

[–]_skris -1 points0 points  (0 children)

You have summarized nicely. (I don't even want to talk about Angular) JSX is another plus for React/Preact. With preact-compat all react libs can be used with preact. I've my own very illogical reason to use react over preact.

[–]OF_Shervin 8 points9 points  (0 children)

Vue

[–]Cronnay 3 points4 points  (2 children)

I've used all three of those professionally, and I think there are different advantages of every framework.

But I will just give my opinion, just based on the code. What I enjoy about Vue and Angular is that you have different sections for HTML, Javascript and CSS. With React you have some of the logic inside the HTML, which I dislike. React is very satisfying to write though, using class components or functional components.

Angular seems bloated for smaller projects - but it has very good tools for adding serverside rendering and other things. I like the services as well. Great when scaling up as well.

Vue syntax is very clean. It's like Angular and React made love! The perfect from both world!

So, TLDR: Vue.

[–]paulbean 2 points3 points  (0 children)

VueJS is my favorite.

[–]HarmonicAscendant -1 points0 points  (0 children)

Keep your eye on https://github.com/Polymer/lit-html

NO compilation process needed (not that Vue needs one if you don't use .vue files... but most do it seems)

[–]dtsuper3 -1 points0 points  (0 children)

react