<el-form :model="user" :rules="rules"
I would still rather write lintable, composable Javascript (JSX) than an embedded mini string language in HTML attributes.This is a strange post, it's even less information than a Vue 101 post?
<el-form :model="user" :rules="rules"
I would still rather write lintable, composable Javascript (JSX) than an embedded mini string language in HTML attributes.This is a strange post, it's even less information than a Vue 101 post?
It would be interesting to see an informed comparison. What's Vue doing that a million other frameworks aren't?
> simpler syntax. I think single-file components is a great thing when you're getting started. While true "js ninjas" will call me out on this, they're probably employed by a large org with problems that are different from mine.
> less choice. I only write frontend occasionally. How would I know which react-router to choose? What's the best redux package? What about handling CSS, what's the flavor du jour? Vue says "want something done - do this. here's vue router, vuex, etc."
Overall, the two are very much similar in both how they work and what they provide, but one is developed and used by an organization that has a virtually infinite supply of engineers, and the other is being developed by one guy.
Technology that makes Facebook successful may be inappropriate for a successful hackathon or a small startup
Vue:
<v-chip v-if="manager.department == 'Engineering'" color="primary" text-color="white" small>{{ manager.department }}</v-chip>
JSX: if (manager.department == 'Engineering') {
return <VChip color="primary" text-color="white" small>{manager.department}</VChip>
}
I dunno about you but I grok code that uses whitespace, braces, and parenthesis to identify branching logic way faster than tag attributes.a) you can write JSX in Vue components since that's your preference, and this is explicitly documented and supported: https://vuejs.org/v2/guide/render-function.html#JSX, and
b) that first example violates the Vue style guide. https://vuejs.org/v2/style-guide/
return ( manager.department === 'Engineering' && <VChip color="primary" text-color="white" small>{manager.department}</VChip> )I'm talking more about the whole experience of building out a full app. How do I structure my codebase? Which packages should I use in 2017? It's a much more trivial exercise with vue if you're only doing frontend work occasionally and not as part of your normal job.
I have to point out that https://github.com/facebookincubator/create-react-app is great if you do decide to go with React and want answers to aforementioned questions.
It'll swing back in another few years. As it always does.
It's not the new Angular. AngularJS was basically the only game in town for a while. React is more popular than Vue, current. And it has Facebook behind it. Angular 2+ has Google behind it. Vue remains an independent underdog.
Plus, having used Vue in production for over a year and React on personal projects, they are incredibly similar. Create an object, give it properties, lifcycle hooks, methods, and a template to render, then chuck it into an html file. React users prefer JSX, but Vue can use JSX just as well.
React and Vue have similar ecosystems around them. Redux for React, Vuex for Vue. React-router vs vue-router. A simple http/ajax lib for making API calls are present for each. React has React Native, Vue has Weex.
Lastly, Vue is super easy to adopt, bit by bit; and it has incredibly well-put-together documentation. All of these things hardly indicate to me that it's going to become abandonware as soon as another framework comes around.
Admittedly, React is a little bit more mature than Vue; but what's React doing that Vue isn't? What's Angular doing that those two aren't? Or Aurelia? Or Mithril?
I've personally preferred React+Redux+Typescript for new personal projects, but when facing a task of modernizing e.g. Angular apps, Vue is much more attractive.
In what way is that a demonstration of flexibility?
> ability to easily leverage existing HTML/Pug/CSS/SCSS/etc, making it an easier target to migrate to.
How is it any easier than React? Seems the exact same to me.
By accommodating developers with various preferences. You can have typechecked classes with TSX like React, or self-contained components leveraging traditional HTML/CSS, which is how Angular components are structured.
> How is it any easier than React? Seems the exact same to me.
There are many similarities between Vue and Angular, especially regarding the DSL in templates. Whereas going from Angular to React is a significant rewrite.
Your IDE should be able to syntax highlight and even lint it.
People have reported some issues with the Vue tooling, but it's worth trying:
brew cask install webstorm
cd your-app && webstorm .