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.yout…
Why we chose Vue.js over React
91–100 of 267 posts
Re: Why we chose Vue.js over React
#92One 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…
Basically React seemed immature, as if it wasn't thought out fully but just hacked together. Vuejs seems like what React could've been if it was thought out a Bit more. It just feels a lot more polished. Honestly I think Vue is so far ahead of the curve it isn't a surprise to see more people switch away from React.
Re: Why we chose Vue.js over React
#93Earlier quoted context omitted.
Yeah, it's possible in React do to it. But compare that to how Vue handles conditionals: HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. You specified a home query: {{location.query.home}} No home query was specified I don't know about you, but to me this code is 100% more readable than the React example you gave.
This is how I've come to write that in React, after giving up on attempting to find a consistent way to write ternaries which I would find acceptable when revisiting them (it just never happened): let Home = ({location}) => HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. {!location.query.home && No home query was specified. } {location.query.home && You specified a home query: {location.query.home} } I…
return (
hello
{
location.query.home
? foo
: bar
}
)
Or just replace that with a one-liner like, and put the respective code where it belongs: {location.query.home ? this.renderHomeStuff() : this.renderEtcStuff()}
And simple ifs are obvious:
hey
{foo && foobar}
Always strive to make your render methods simpler.Re: Why we chose Vue.js over React
#94The 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...
Re: Why we chose Vue.js over React
#95Earlier quoted context omitted.
So React showed that Angular and Ember shouldn't be used, but Vue is just shinier than React right now?
No one gets fired for using React. Vue isn't even shinier in my opinion. It makes the same templating mistakes that Angular and Backbone did.
Re: Why we chose Vue.js over React
#96Earlier quoted context omitted.
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 h…
Re: Why we chose Vue.js over React
#97I once wanted to use React as a virtual DOM library, nothing more. Turned out that I had to create "components" for every div I wanted to draw. Of course, this was a nuisance to the point that I had to let go of React.
const {render} = require('react-dom');
const {DOM} = require('react');
render(
DOM.div({className="something"},
DOM.div({className="something-else"},
'some text',
),
),
document.getElementById('root'),
);
Components become useful pretty quickly as your views grow in size, but even then, function components require very little extra code to use.Re: Why we chose Vue.js over React
#98The 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()…
Re: Why we chose Vue.js over React
#99I hope I don't get downvoted for asking this but is React going out of fashion already? A lot of the talk about it was "React is here to stay" or "React is as permanent as JS itself" but now this is the second or third time people seem to be going for Vue instead. What happened?
React is in no way losing popularity. It's just not as interesting to write about something everyone agrees on. That said, React won't be around forever - very little ever is.
Re: Why we chose Vue.js over React
#100I once wanted to use React as a virtual DOM library, nothing more. Turned out that I had to create "components" for every div I wanted to draw. Of course, this was a nuisance to the point that I had to let go of React.
You seem to be mistaken. You don't need to create components if you just want to render some divs. You can just do const {render} = require('react-dom'); const {DOM} = require('react'); render( DOM.div({className="something"}, DOM.div({className="something-else"}, 'some text', ), ), document.getElementById('root'), ); Components become useful pretty quickly as your views grow in size, but even then, function componen…
And can I be sure that React will not perform updates behind the scenes at other moments than when calling "render"?