Earlier quoted context omitted.
I have been building web apps for 19+ years. I like many of the frameworks out there but for some reason I HATE React. I think JSX is a huge turnoff for me. I just can't get past html in javascript. It feels wrong. With that said, there are so many VERY smart people embracing React, so I am always questioning my "hate". Maybe one day I will change my mind. I haven't use Vue but watched/read about it and seems very co…
For a long time, people have been saying "separation of concerns" to support the idea of keeping HTML, JavaScript, and CSS in separate files. The problem with that is that the document, application state, and styling is all highly coupled when dealing with web apps . Web pages which are content based are fine with these being separate, changes to one don't necessarily affect another. For web pages, the separation of…
Vue.js vs. React
311–320 of 486 posts
Re: Vue.js vs. React
#312Earlier quoted context omitted.
> What's wrong with looping this way? The problem IMO is that it's harder to read and write than: {{num}} That's Vue's syntax, but any other templating language is more readable to me than JSX.
Templates have always been nice for basic examples. But now what happens if you only want to show odd numbers in listItem? It's not obviously clear how to do that in this example. Then you start adding in filters or Angular pipes. And the syntax grows in complexity until it becomes unwieldy. If you know the basic rules of JS, you already know how to achieve this with JSX. There's no need to go read the docs.
So is this really a problem?
Re: Vue.js vs. React
#313I've built semi-large applications in both Vue.js and React. I like both but prefer React. For me Vue.js is like a light-weight Angular 1, in a good way. It's very intuitive and you can start working immediately. It does however easily end up in confusion about where the state lives with the two-way binding. I've run into a lot of implicit state changes wrecking havoc. The declarative nature of React definitely wins…
I've been in this gig for years upon years and I still don't see what's terrible about two way binding. Can someone actually justify it without handwaving statements like "you'll notice at scale", or red herrings like "Angular is slow"?
Re: Vue.js vs. React
#314Earlier quoted context omitted.
I'm not sure I follow. To use the basic example from the link, as opposed to this: const listItems = numbers.map((number) => {number} ); return ( {listItems} ); What's wrong with looping this way?: return ( {numbers.map((num, i) => {num} )} )
> What's wrong with looping this way? The problem IMO is that it's harder to read and write than: {{num}} That's Vue's syntax, but any other templating language is more readable to me than JSX.
Re: Vue.js vs. React
#315Earlier quoted context omitted.
Templates have always been nice for basic examples. But now what happens if you only want to show odd numbers in listItem? It's not obviously clear how to do that in this example. Then you start adding in filters or Angular pipes. And the syntax grows in complexity until it becomes unwieldy. If you know the basic rules of JS, you already know how to achieve this with JSX. There's no need to go read the docs.
Haven't used VueJS but the obvious thing to me would be to do your data transformations before hitting the view code - separating view code from business logic. So is this really a problem?
Re: Vue.js vs. React
#316I've built semi-large applications in both Vue.js and React. I like both but prefer React. For me Vue.js is like a light-weight Angular 1, in a good way. It's very intuitive and you can start working immediately. It does however easily end up in confusion about where the state lives with the two-way binding. I've run into a lot of implicit state changes wrecking havoc. The declarative nature of React definitely wins…
I have been building web apps for 19+ years. I like many of the frameworks out there but for some reason I HATE React. I think JSX is a huge turnoff for me. I just can't get past html in javascript. It feels wrong. With that said, there are so many VERY smart people embracing React, so I am always questioning my "hate". Maybe one day I will change my mind. I haven't use Vue but watched/read about it and seems very co…
Re: Vue.js vs. React
#317Earlier quoted context omitted.
> I can at least remember six template engines' syntax I've learned... TBH, in 2017, I'm not sure why we're still hand-generating HTML with any template language. Instead, I'd really like to see a framework that gets away from the idea of HTML templating altogether and presents a true component/properties model on top of a canvas with flexible, property-driven layout options. I think the intense UI-demands of progres…
See Elm.
When I last gave it a try I had to manually generated the HTML document but without a (at least of of the box) syntax like jsx. If I recall correctly graphics is still there, but it's mainly used for games
Re: Vue.js vs. React
#318You'll see quotes in this thread like "The demand for both React and Vue.js is growing tremendously" thrown around. It's good to check out npm install stats to get an unopinionated comparison. https://npm-stat.com/charts.html?package=react&package=vue&p... In reality, React is downloaded roughly 4-5x more than angular and 7-8x more than Vue. In August so far, React has 75% market share among these three libs. Interes…
I really don't want Vue to become another React. React used to be a single dependency in the browser and now it is difficult to find examples and discussions that don't require downloading npm and all these other components.
Re: Vue.js vs. React
#319Vue is good for simple things. But it do not shines for complex apps and sometime makes it even harder than it should be. React can appears complicated when beginning, but it pays off on complex apps.
i'd say it's quite the opposite. vue makes complex apps easy to write, where react makes it look complex all the time.
Re: Vue.js vs. React
#320Earlier quoted context omitted.
You can make it cleaner: Button
Vue allows you to use Pug syntax in your templates, so this can be even simpler: button(:disabled='isButtonDisabled') Button div(:id='`list-${id}`") form(@submit.prevent='onSubmit') a(@click='doSomething')
JSX is incredibly simple. Why would you do that to yourself and other devs?