3 ms·
The far biggest problem with Vue for me is the template language. Once you've used JSX you just don't go back to Angular style templates.
by Kiro 9y ago
The far biggest problem with Vue for me is the template language. Once you've used JSX you just don't go back to Angular style templates.
- CharlesW 9y agoA couple notes: (1) You can use JSX with Vue. https://vuejs.org/v2/guide/render-function.html#JSX https://vuejs.org/v2/guide/render-function.html#JSX (2) By "Angular style templates" do you mean Vue's Single File Components? Because from my POV they're glorious, and the primary reason I'd be reluctant to use React instead of Vue.
- p49k 9y agoRe #1: for both React and Vue, if you don't stick to the most common and standard methods for implementing functionality, you're going to cause yourself a lot of unnecessary pain. Everything around those ecosystems (documentation, debugging tools, libraries, etc) is designed for streamlining development for people who don't stray from the mainstream.
- Kiro 9y agoThanks. I mean "v-" etc in HTML, which is like "ng-" in NG1.
- dannytatom 9y agoActually the opposite for me, and the original reason I went with Vue (tho after using it more I like a lot about it). I just do not get the appeal of JSX. Directives are meh, but I still prefer it to JSX.
- buchanaf 9y agoDo you think that your preference is just from your previous experience? JSX feels like uninhibited templating to me, which is great when it is done right (and a little crazy when done poorly). I also feel like it gives cleaner error messages.
- dannytatom 9y agoVue (+ ESLint) give pretty clear errors when you've messed up that make it quick to fix. But yea, I mean I think it's subjective for most people. I'm not sure there's any real reason to go one or the other outside of developer happiness (could be wrong, though). A big part of Vue is to have a low learning curve and be less opinionated. So it feels more like enhancing your workflow (either in existing apps or new ones) than adopting a whole new way of doing things. I'm just personally more into that. Also, for what it's worth, you can use JSX with Vue. The only downside I can think of is any time you have a problem it might be hard to find solutions since most people stick to directives. If you already know JSX, though, that might not be an issue.
- raphaelsaunier 9y agoI'd say that this is a matter of personal taste. After having worked extensively with both, I still can't get used the JSX-way of doing interpolation or conditionals and find the infamous Angular style template easier to reason about and work with. Having said that, you might be interested to know that there's an official Babel plugin that lets you write your Vue templates with JSX: https://github.com/vuejs/babel-plugin-transform-vue-jsx https://github.com/vuejs/babel-plugin-transform-vue-jsx