Live data from Hacker News

Why we chose Vue.js over React

pixeljets.com

81–90 of 267 posts

Re: Why we chose Vue.js over React

#81
post #75

I am still unsure if there is a legit use case for Vue or React over plain HTML+CSS+JS. I can understand the use case for React native. To build native applications on multiple platforms. But what is the use case for React, Angular, Vue etc? Can somebody give a minimal example?

It's about maintaining complex UI state for me. Not sure how to fit that in a minimal example. Those all look like Vanilla JS can handle it.

But when things get big, or sorta complex, or try to have very fine UI behavior for complex workflows then React, Vue or my fave Riot really shine.

If it's minimal you don't need these. When it's not you'll be glad you have them.

Re: Why we chose Vue.js over React

#82
Vuejs looks great for POCs or small projects. It feels better like Angular-1 to start with. I use VueJs a lot for small stuff i.e. usually something that I can fit into one index.html file and forget about it. React killed that simplicity (i.e. stopped supporting it). Angular2 - I can't figure out why anybody uses that.

But when it comes to larger projects - I still go back to React, TypeScript and Redux. While Vuejs makes it simpler to code, React+TS+Redux make the end-product very much reliable.

Re: Why we chose Vue.js over React

#83
post #59

> Fun fact: Yii was created by a Chinese speaking guy - Qiang Xue. So, you might call Yii+Vue stack not just very difficult to pronounce, but also a Chinese stack :) Fun fact: Qiang Xue got his PhD at Duke University and developed Yii2 while living in the D.C. Area by leading a multi-national team of core contributors, the top 3 being from Germany, Russia, and Ukraine. He also moved on from the project mid-2015 and t…

I was never trying to put anything negative into this statement that both these bright people are Chinese-speaking. I know they both live in US (though it might be unfortunate for us that Qiang is currently doing Go programming in Capital One instead of actively developing Yii2). Yii2 and Vue.js are top notch.

I didn't so much read it as a negative, it's just that readers unfamiliar with the projects may think that "Chinese stack" means 1) code/issues are in Chinese and/or 2) the main contributor base is located in China.

I've been a long time user of Yii1 and Yii2. Qiang has created 3 PHP Frameworks between 2004-2015: PRADO, Yii1, and Yii2. At one point he was on a >700 day commit streak with work on Yii2. I can't blame him for needing to focus on his own professional career - OSS doesn't always pay the bills and can be very demanding.

Re: Why we chose Vue.js over React

#84
post #69
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…

Is there a Vue Native project of some sort? Currently planning on using React for a new project strictly because I can use the same components for a native app on multiple platforms.

Check out https://github.com/mcudich/TemplateKit

Re: Why we chose Vue.js over React

#86
post #68
post #27

Earlier quoted context omitted.

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 s…

I get the feeling that the terms "easy" and "simple" are being mixed up here. MobX is a lot more complex than Redux (core), as it tries to do a lot more things that are braided together as a package. In Redux you choose to bring in that complexity (reselect, redux-saga, etc) if necessary. "Easy" is subjective, "simple" is not.

Save me the Rich Hickey talk.

MobX is dead simple, it's a short write and here's how it works:

- observables: add a getter/setter pair in place of the property - when it gets modified emit an event. - observer: when an observable getter gets called inside the `render` in React - listen to future updates and re-render. - computed: do the same thing as observer - but emit the value instead of rendering.

All MobX does is change detection, it has a very low API surface, it can be implement in a lot less code (but optimizes heavily) and it is one of the simplest packages I worked with without middlewares and connectors and selectors and so on.

In Redux you have a dispatcher, actions, a reducer and so on. In MobX you just have plain JavaScript objects for state and plain functions. MobX also composes much better with things like Rx.

Re: Why we chose Vue.js over React

#87
Vue JS framework is very simple yet powerful, also better in performance wise. Learning curve is very easy. You can pick the fundamentals in a day or two. Within a week you can reach intermediate level.

It comes with all the basic stuff of SPA like data binding, event handling, routing, state management, components.

I have been creating a video tutorials series on Vue js 2 framework.

Vue.js Tutorials: http://www.youtube.com/playlist?list=PLJ6Y8JfXAV-8_2lHNgP1Dh...

Re: Why we chose Vue.js over React

#88
post #65

The arguments against JSX and React requiring many small components are very surface level and sound like "we couldn't figure out how to make it work for us so it must be impossible". 1. This was mentioned already, but, yes, you can use ternaries and boolean logic for simple conditionals (loggedIn && Logout || Login ) 2. When you need more markup, put them in an if-else statement in the same render function. render()…

Thank you for fixing the misleading information from this article.

I would add:

1."now you have to create 10 functions to get input from 10 inputs".

Or you can learn JavaScript:

  handleChange(event) {
    this.setState({ [event.target.name]: event.target.value })
  }
2. "Redux sounds like a synonym of verbosity, as well."

Nobody forces you to use Redux.

https://medium.com/@dan_abramov/you-might-not-need-redux-be4...

Re: Why we chose Vue.js over React

#89

I'm a designer and not a coder, so I feel obliged to provide my comments with salt added up front. That being said, JSX vs. wrapping HTML in if-statements seems like the same kind of trouble to me. I've done a few simple prototypes in Clojure/Script, so my reasoning is heavily influenced by the fact that I know very little about other languages, and only have moderate amount of knowledge about Clojure. The solution I…

Can you tell me what clojure libraries/frameworks work the way you describe? I'm learning clojure and would like to build some toy web apps because I've never done webdev before.

Re: Why we chose Vue.js over React

#90
post #65

The arguments against JSX and React requiring many small components are very surface level and sound like "we couldn't figure out how to make it work for us so it must be impossible". 1. This was mentioned already, but, yes, you can use ternaries and boolean logic for simple conditionals (loggedIn && Logout || Login ) 2. When you need more markup, put them in an if-else statement in the same render function. render()…

After making some simple , etc custom components.... I've wondered why they don't exist in react by default, or arent the common pattern. They are very readable... maybe people just dont like the "logic" in a tag... i guess... whatever, made for some really readable code...

Regarding component - here is the guy that suggested this and then admitted that this is a bad approach in a long run: http://stackoverflow.com/a/26152067/1132016
Post reply on HN