Live data from Hacker News

Why we chose Vue.js over React

pixeljets.com

21–30 of 267 posts

Re: Why we chose Vue.js over React

#21

My man, a lot of the pain described in this article can be solved by Mobx: https://stackshare.io/mobx One of our engineers at StackShare[0] suggested it and it's fantastic. Mobx is very simple to understand and will make writing a "React" page a real joy again. Redux was way too complicated for what it gave, and just shot term after term after term at me that left me with a headache. I still don't understand Redux pr…

> Simple, scalable state management

https://github.com/mobxjs/mobx

It says "simple" but looks complicated. Any pointers? Is it because I don't know how decorators work it looks complicated?

Re: Why we chose Vue.js over React

#22
Thanks for the detailed write up and comparisons. Also kudos for not bashing other frameworks and giving a level headed comparison.

Two big things I noticed that drove you away from react.

1) too many subcomponents: I think jsx can be improved to have logic tags within them. E.g and tags that the transpiler can move to ternery and array map calls.

2) too much verbosity: something like mobx or deep-observable can help here.

Honestly react has become the Java of UI. Going back to fundamentals. All you need is a tiny library that diffs a vdom tree to real dom.

And you need a tiny library that allows you to observe a single source of truth object and connect it to view.update() changes.

All in all this shouldn't take more than 5kb of code.

We all want: good abstractions, fast performance, actionable errors and small library so the page loads in no time.

Re: Why we chose Vue.js over React

#23
post #13
post #11

One of the most impressive thing about Vue.js was the ability of the framework to enter a field saturated with dozens of options, that was becoming dominated by a well-resourced oligopoly (Angular, React), and still win over developers jaded from Javascript-fatigue. The give-a-shit factor from Evan (the creator) is extremely high and was key to its success. Inspiration for anyone building a product in an established…

VueJS is pretty old, old enough to be there when React and Angular were just emerging as viable options. It's great, and I'm grateful for it being around and for Evan's contribution but I think it was pretty lucky timing wise.

Angular was released in 2010. Vue was released in 2014. Bit weird to call it "pretty old", and Angular was well established by then - they announced the v2 preview around the same time.

Re: Why we chose Vue.js over React

#24
post #14

My man, a lot of the pain described in this article can be solved by Mobx: https://stackshare.io/mobx One of our engineers at StackShare[0] suggested it and it's fantastic. Mobx is very simple to understand and will make writing a "React" page a real joy again. Redux was way too complicated for what it gave, and just shot term after term after term at me that left me with a headache. I still don't understand Redux pr…

The problem with the JS world.

There is a valid criticism at the core here, that the JS community jumped a bit too quick on Redux/Flux. Even the author of Redux said quite a few times now that you should not blindly use Redux, but only if you see an actual need for it.

I liked Redux when I experimented with it, but it is not a panacea, the advantages you gain are not entirely for free, and it might not be worth the boilerplate and complexity if you don't have a very complex application.

Re: Why we chose Vue.js over React

#25
post #3

I was initially confused about why a Drupal shop would need either Vue.js or React, since Drupal sites are most typically blog like things. Appears it's for their backend though, and this is actually pretty nice: http://pixeljets.com/sites/default/files/why-we-chose-vuejs-...

Blog like things? http://www.nba.com/

Re: Why we chose Vue.js over React

#26
post #17

I'm not sold on the whole "code quality" vs "getting things done" mentality here. I think there are diminishing returns in reducing technical debt and keeping a high quality codebase, but the point of doing it that you can maintain a sustained, relatively high "getting things done" rate over the project's lifetime. There are times where you should implement something in a quick and easy way, but if code is going to b…

Some of this reminded me of the discussions about logic-less templates and proponents/opponents of that philosophy.

Re: Why we chose Vue.js over React

#27
post #21

My man, a lot of the pain described in this article can be solved by Mobx: https://stackshare.io/mobx One of our engineers at StackShare[0] suggested it and it's fantastic. Mobx is very simple to understand and will make writing a "React" page a real joy again. Redux was way too complicated for what it gave, and just shot term after term after term at me that left me with a headache. I still don't understand Redux pr…

> Simple, scalable state management https://github.com/mobxjs/mobx It says "simple" but looks complicated. Any pointers? Is it because I don't know how decorators work it looks complicated?

MobX is _incredibly_ simple.

If you have a property you need observed - add a `@observable`.

If you have a react component you want to update automatically, add `@observer`.

Derive as much as you can using `@computed`. You can but shouldn't use `autorun` which monitors side effects.

If you're already used to Vue it's very similar except it works with React.

That's pretty much it - just clone a boilerplate - the API surface is _tiny_ and everything "just works". I have a hard time describing how stupid I felt for using Redux after playing with MobX for 10-20 minutes.

Re: Why we chose Vue.js over React

#28
post #25
post #3

I was initially confused about why a Drupal shop would need either Vue.js or React, since Drupal sites are most typically blog like things. Appears it's for their backend though, and this is actually pretty nice: http://pixeljets.com/sites/default/files/why-we-chose-vuejs-...

Blog like things? http://www.nba.com/

Yes. And you could produce that with wordpress as well using custom post types, with probably a similar amount of headache. They are both CMS systems that primarily handle taxonomy, nodes, tags, WYSIWYG editing, etc.

Re: Why we chose Vue.js over React

#29
Our company migrated to vue.js, 6 months ago. Our complex app is messy with JSX, router, and new dev can't keep up with code. Now we start every new app with Vue.js. The gap between junior dev and senior dev comes closer. They can collaborate with less bugs, less problems and less time to develop.

Re: Why we chose Vue.js over React

#30
post #13

Earlier quoted context omitted.

VueJS is pretty old, old enough to be there when React and Angular were just emerging as viable options. It's great, and I'm grateful for it being around and for Evan's contribution but I think it was pretty lucky timing wise.

Angular was released in 2010. Vue was released in 2014. Bit weird to call it "pretty old", and Angular was well established by then - they announced the v2 preview around the same time.

>>Vue was released in 2014.

That makes it pretty old. This is JavaScript we're talking about. :)

And Angular 2 is different enough from Angular 1 that it might as well be brand new. So I think the OP's comment is valid.

Post reply on HN