I believe React is popular (among other reasons) because you don't need to learn what is v-if v-else and other repeative commands when you have plain and simple JS equivalents. React has te philosophy "It jusy works", and people love this
Why we chose Vue.js over React
51–60 of 267 posts
Re: Why we chose Vue.js over React
#52Out of curiosity, one reason the author mentions (and I know, it's not his selling point) which I've seen others reiterate is that React's render() method doesn't support if statements. I know you can write something like the code below in React, so what exactly does that criticism refer to? function Home(props) { return ( HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. { (() => { if (props.location.qu…
My understanding of React was that conditions such as this should be handled by whatever is managing the state of the component, be it a method call within your view that alters your the local state, or a store based system such as Flux/Redux where the state is handled outside the view itself. Part of what makes React a beautiful framework (to me) is the concept of a state which controls what is rendered. Controlling what is rendered directly from the render method in the view seems to defeat one of the purposes of using a stately framework such as React in the first place. Sort of a cart-leading-the-horse situation.
Again, though, I am new to this framework (and JS frontend development in general) so please feel free to correct me.
Re: Why we chose Vue.js over React
#53Fun 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 the other maintainers have run day-to-day operations since then. It's not a "Chinese stack". I've read the source and issues extensively and it is high quality code that welcomes high quality contributions - no matter where people are from.
Re: Why we chose Vue.js over React
#54Just providing some balancing thoughts for folks to be aware of before investing heavy time in any framework, including this one.
Re: Why we chose Vue.js over React
#55Out of curiosity, one reason the author mentions (and I know, it's not his selling point) which I've seen others reiterate is that React's render() method doesn't support if statements. I know you can write something like the code below in React, so what exactly does that criticism refer to? function Home(props) { return ( HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. { (() => { if (props.location.qu…
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.
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 usually put all the possible negative cases first because outside of micro-snippets they tend to be short and sweet compared to the positive condition.Re: Why we chose Vue.js over React
#56Re: Why we chose Vue.js over React
#57Earlier quoted context omitted.
Do you have numbers? Angular 2 is quite small if you're using treeshaking.
Not really; it has a big unshakable core
Much of the core is shakeable, I don't believe your assertion at all. As you use more features, the app size would grow would be true due to using parts that were previously shakeable becoming unshakable, but that complexity being in a unified language/base of a framework worked on by very smart people is most of the time better than homebrewed business logic by an above average developer
Re: Why we chose Vue.js over React
#58I 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.
Re: Why we chose Vue.js over React
#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…
Re: Why we chose Vue.js over React
#60Out of curiosity, one reason the author mentions (and I know, it's not his selling point) which I've seen others reiterate is that React's render() method doesn't support if statements. I know you can write something like the code below in React, so what exactly does that criticism refer to? function Home(props) { return ( HELLO Duis a turpis sed lacus dapibus elementum sed eu lectus. { (() => { if (props.location.qu…