Earlier quoted context omitted.
Which part of this is clean or pretty? Button There are some redeeming qualities compared to say, Polymer. But it's neither clean nor pretty
1) @ is just a shorthand for v-on:*, like onclick,onmouseover,on submit, etc. (ie; v-on:submit is alias ed by @submit) @click="say_something('hello')" new Vue({ methods: { say_something (str) { ... } } }) 2) : is just a shorthand for v-bind (ie; v-bind:disabled="is_disabled()" is aliased by :disabled="is_disabled()"). and this basically allows you to run pure javascript code inside of it. 3) the only other syntax to…
Vue.js vs. React
211–220 of 486 posts
Re: Vue.js vs. React
#212Earlier quoted context omitted.
> First reason is we hate JSX. It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading. It's like writing shitty PHP code without templates. You could theoretically write some template components and "avoid" javascript altogether. I wonder if anyone has actually done that? JSX isn't perfect, but I find the dirty things about it can be mitigated by keeping your componen…
Yes, there is a project called react-templates by Wix that does that. We used it, but once you start using libraries like that one or MobX, why even use React at all?
Well, you've got a point. I can realistically see some developers preferring to piece-meal their front end solution though, or build just the parts they need themselves. I like Vue, but the API seems enormous. I get that a lot of people like that about it, though.
Re: Vue.js vs. React
#213To me the whole idea of client-side HTML templates seems bad. They start out easy enough, but then they either limit you in power or introduce new and weird concepts to replace things that are easy, familiar and often better designed in the host language. Here is an example on which I'd love to be proven wrong: https://jsfiddle.net/j2sxgat2/2/ Its a generic spinner component that waits on a promise then passes off th…
https://codepen.io/Kradek/pen/JyLPaL?editors=1010
I really haven't run into anything I could do in React that I couldn't do in Vue. What I mainly miss in Vue is react-native.
Re: Vue.js vs. React
#214How are people getting along with Vuex vs Redux? It looks pretty clean and grokable in the examples and deals with async out of the gate - https://github.com/vuejs/vuex/tree/dev/examples/counter
If you use something like Kea ( https://kea.js.org ), the amount of boilerplate for Redux goes down dramatically. The syntax is actually pretty simiar to Vuex, perhaps with even less boilerplate.
Re: Vue.js vs. React
#215We moved away from React to Vue about 8 months ago and everyone on the team is a lot happier. First reason is we hate JSX. It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading. It's like writing shitty PHP code without templates. It also forces you to use a lot of boilerplate like bind(), Object.keys(), etc. Another problem with React is that it only really solves o…
I don't get this complaint at all. Between map and ternary expressions, you can get both loops and conditionals in your markup, e.g.
{listOfThings.map(thing => thing.isX ?
)}
Re: Vue.js vs. React
#216Earlier quoted context omitted.
I agree with with you that this is an important issue. However, your aggressive comments that ignore what the other person said may not be helping.
I am getting more aggressive because the other person completely ignores the effects on the surrounding ecosystem, and does not even consider a solution that would provide a compromise, as the "optimized for chrome and safari, ignore and use anyway" button would provide. I see their situation, and their limits, but this is a very egocentric opinion that completely ignores the effects on the rest of society, which is…
Re: Vue.js vs. React
#217We moved away from React to Vue about 8 months ago and everyone on the team is a lot happier. First reason is we hate JSX. It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading. It's like writing shitty PHP code without templates. It also forces you to use a lot of boilerplate like bind(), Object.keys(), etc. Another problem with React is that it only really solves o…
> First reason is we hate JSX. It forces you to write loops, conditionals, etc, outside of the markup you are currently writing/reading. It's like writing shitty PHP code without templates. You could theoretically write some template components and "avoid" javascript altogether. I wonder if anyone has actually done that? JSX isn't perfect, but I find the dirty things about it can be mitigated by keeping your componen…
I just feel JSX is too awkward and verbose to be pleasant working.
Re: Vue.js vs. React
#218Where React wins for me:
- Higher order components - Stateless functional components - React 16, especially the scheduler
Also I really like building the virtual DOM directly (JSX) but that doesn't seem to be very popular reading the other comments.
Re: Vue.js vs. React
#219I'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…
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
#220You'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…
React was in the same spot a few years ago. It went from a dark horse to the default over the past two years.