5 ms·
Try Vue.js. It's what Angular 2 could have been, if they had taken proper advantage of ES2015 and virtual DOM. Another way of looking at it: Angular 1 and React
by azurelogic 10y ago
Try Vue.js. It's what Angular 2 could have been, if they had taken proper advantage of ES2015 and virtual DOM. Another way of looking at it: Angular 1 and React had a baby, and they named it Vue.js.
Vue has HTML templates like Angular and virtual DOM like React. It is faster than both of them. It has a smaller file size than both of them. It has a clever single file component concept that makes developing components much easier. It uses a one-way data flow concept like React+Flux. Vue even has it's own competitor to redux/mobX called Vuex, and what makes it easier is that Vue is cognizant of Vuex's existence. There are really solid dev tools for Chrome as well (Vue and Vuex are aware of the dev tools as well).
I run a dev meetup, and I had planned to give a talk there on Angular 2. I even gave talks on JS tooling a year ago and TS last summer in preparation. Instead, I gave a talk on Vue this month, and people loved it. Here are the slides if you want to check it out (there are even embedded Vue apps!): https://azurelogic.github.io/vue-js-2.x-talk/#/ https://azurelogic.github.io/vue-js-2.x-talk/#/
- boredpudding 10y agoThanks to this comment I'm looking at it now. The only thing I hate is 'v-for="todo in todos"' as an html attribute. I would personally prefer a mustache-like syntax. Other than that, this looks awesome. Time to develop a todo app.
- ng12 10y agoWhy are HTML templates a good thing? It's hands down my least favorite part of Vue.
- catenthusiast 10y agoYou don't even have to know use them. You can use render functions or JSX like React.
- VertigoJenny 10y agoIt makes integration with existing code trivial. Vue's HTML templates can be neatly integrated into pretty much anything without a struggle compared to tools that make assumptions about your build chain and what you are working with. To use Vue, you could include it with a <script> tag and suddenly your existing HTML can be rapidly extended. Or you could get way more involved and use webpack, JSX and such if you wanted to. To not have HTML templates means you need to do something more invasive to retrofit client-side templating into place. It's personally why I don't bother with libraries that don't offer similar, because I don't always have total control over what I am working on and I still need to get work done.
- azurelogic 10y agoI find them to be helpful in being able to see the markup as a complete chunk, without code getting in the way. In teams with "coders" and "designers", this also makes it easier for the designers to understand the components and do their work.
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- jeppebemad 10y agoComing from Angular 1, having tried and enjoyed React, Vue is godsend! I've been working with it for a few weeks and my productivity has skyrocketed. Debugging is amazing and their webpack templates just work. The learning curve with an angular background is almost flat, and the ecosystem is surprisingly mature already. I don't care about templates being "bad" a as long as it works for us. I'm sold.
- equasar 10y agoI'm glad that Angular 2 is the way it is because it allows to build enterprise-sized applications more easily that using Vue.js. I love Vue.js too, but just for small projects or when I need to add some complex functionality to an existing site that is not SPA. I guess it comes down with the saying "the right tool for the job".
- camus2 10y ago> I'm glad that Angular 2 is the way it is because it allows to build enterprise-sized applications more easily that using Vue.js. That's just FUD, there is nothing in Angular that makes it more oriented toward Enterprise than Vue.js, unless you consider bloat an necessary component of any enterprise oriented solution, which is obviously a lie. What will decide which framework is "enterprise" is the ecosystem, the amount of widgets, not the bloat. > I guess it comes down with the saying "the right tool for the job". Exactly, the right tool for the job, AKA using a library that does only what it should do instead of trying to be anything and everything because its creators think the complex it looks, the more enterprisey it sounds. They will learn the hard way, and so will you.
- xj9 10y agoi've built large applications in both Vue and Angular 2 and i still prefer Angular. don't get me wrong, Vue 2 is really nice, but i strongly prefer TypeScript over any JavaScript revision. Flow is helpful, and Vue 2 has typings, but it isn't quite as powerful as working with a TypeScript framework building a TypeScript app. to each their own, of course.
- azurelogic 10y agoI'm on the fence about TS. I see the value in it, but it can be a lot of trouble to use, and I have found that the mistakes I make are almost all caught by a ESLint (and the remaining mistakes aren't type system mistakes).