Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I looked at Vue.js and came away with the impression that it requires me to learn a lot of framework-specific implementation details. For instance, a list requires that you know the v-for directive, while in React it's just JavaScript's Array::map().

Couldn't see the value there.



These directives take less than a day to learn. 99% of the time it's far easier to write HTML tags with data and event binding directives than hack around with JSX and passing all those props.

You can also use JSX with Vue if you want. Just add a render() function to the component. That's what happens anyway when you use a normal template, the Vue compiler turns it into a render function the same way JSX is compiled by React.


Using Vue's pseudo-HTML directives might be easier for many cases, but it is less powerful than JavaScript. In some cases, these restrictions leads to workarounds or rewrites. I agree with the grand-poster that the added value is controversial.

As for JSX with Vue, it's clearly a second class citizen. For instance, last I checked, JSX + TypeScript was broken, though both are officially documented with Vue.


I actually found make it restricted (compare to js) improve general code quality as you don't have too much items to abuse. Probably not ideal for personal project because it won't let you fly as you want. But it is awesome for collaboration because you can't really write something way too off with it.


Yea, the 1% of the time you need that extra control then you can easily use JS render function or JSX. The documentation covers all of this: https://vuejs.org/v2/guide/render-function.html


I haven't found it very limiting, however, because it is very well defined, in Vue3 they are looking to actually use this to make massive optimizations in rendering that you simply can't make when you use javascript anyway you like to assemble things.


and using promises with vue is nightmare.


Using promises where? And what's difficult about them?


[Citation Needed]


That feels like learning Angular template syntax, and I really dislike it. React has its warts, but I find JSX very readable, much more flexible.


I dislike both. Most readable template syntax for me is PHP's "alternative syntax for control structures" (the one with colons instead of braces and closing keywords).


That feels like JSP to me, and I don't have fond memories of JSP.


JSF somehow managed to be even worse than JSP.


> Couldn't see the value there.

When you're choosing a JS framework you need to factor in the experience the user has along with the experience you have. I don't know much about Vue but React comes with a huge amount of bulk. A lot of JS that has to be parsed before anything can even be done on the page.

If you're choosing React because it allows you to fall back on what you know rather than learn something new you're making an ill-informed choice.


Right now, Corona made some time for that, I'm rewriting something I tried to do in Vue. I don't work with Vue daily and that makes it real hard to do even the simplest things. I'm back to vanilla JS, few sprinkles of jQuery and HTML5. Works well for me.


exactly. React works so well with js. And vue claims to be simple but tbh its hard. working with async await function, promises are so weird. And you need packages for simple stuff also.


Really? async/await just works by in Vue. And React doesn't need packages for simple stuff? Really??? Are you sure you've ever used Vue?


do you want to see the value? if so, here it is:

By itself, there is no inherent value in either v-for or Array::map(). However, these choices do not exist in a vacuum, they are other decisions in place, which do provide significant value:

- React, allows full power of js when writing template. and easy to express and decompose components into functions. while Vue does not allow the fine-grained in template unless you go into Vue's JSX) - Vue, via template-based approach, enables Developers to deploy apps without a build step, while React forces devs to add a build step(and a compelx one at that) to pipeline


React: supports JSX and vanillajs render function.

Vue: supports JSX, vanillajs render function, pug, and its default HTML templates.

You: "React allows full power of js"

Ok




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: