Hacker News new | ask | show | jobs
by kennysmoothx 3225 days ago
I used React for a few years and it was great and powerful, there were many things however that I disliked.. Particularly I was not a fan of JSX. I liked React but I did not feel comfortable using it.

When I first saw VueJS I had a hard time understanding how it would be any better than React, that is until I saw single file components.

https://vuejs.org/images/vue-component.png

I fell in love with the eloquence of being able to separate my HTML, JS, Styles for a single component.. it seemed /right/ to me..

In any case, I've been using VueJS ever since for my new projects moving forward and I'm very happy with it. It has everything I would ever need from React but in what I feel is a more polished and thought-out way.

Just my two cents :)

2 comments

Completely agree! Single-file components are more natural to how I think about the web.

It's worth noting that Vue also supports render functions with JSX (https://vuejs.org/v2/guide/render-function.html).

One of the reasons I moved to vue was the template section allowed normal html. Saved me so much time styling.

I do like jsx for simple things but always felt it bogged down the design piece having to convert even if its just the class to className

> I used React for a few years and it was great and powerful, there were many things however that I disliked.. Particularly I was not a fan of JSX.

JSX is no more than sugar for vdom function calls. You can use React without JSX, and you can use Vue with JSX.

> When I first saw VueJS I had a hard time understanding how it would be any better than React, that is until I saw single file components.

> I fell in love with the eloquence of being able to separate my HTML, JS, Styles for a single component.. it seemed /right/ to me..

You… can do that just fine in React? The logic and "template" are in the same file in the first place, and there are solutions like styled-components, csjs or react-styl if you also want the JS.

Everytime the discussion of React vs. VueJS comes out, there are always people that make the argument that you can make React do everything VueJS can.

Of course you can, these are open sourced projects and you can modify and add packages to do just about anything you want it to do.

However, when presented with an option that is designed from the ground up to work exactly the way you like it, why not use it?

I can install a dozen different packages along with React so that I can get it set up exactly how I want, or I can just use VueJS whose creator's philosophy are more inline with my own and is designed exactly how I like my front-end.