News for hackers. Stuff that matters.
Re:Switching From React To Vue.js by mpolichette on Sunday May 28, 2017 @07:04AM (#14433898)
Do people like Vue because it's more declarative than react? Is it mostly angular devs switching and getting the best of react but still having directives?

I like the control react gives me without the black box 'compiler' which seems like it makes a bunch more choices for you.

I'm probably biased, someone cmv?

Re:Switching From React To Vue.js by cormacrelf on Sunday May 28, 2017 @07:14AM (#14433923)
I hate directives. There is nothing you can do with them you can't do with just plain callbacks or putting React components inside another that renders its children. HTML templating directives are stupid too, I find myself looking up syntax references for angular even though I've used it for ages. (Think semicolons and magic variables like `$event` or `index` in *ngFor bindings – you don't need these unfortunate and necessary syntactic choices if you just use JSX.)

So yeah, Vue is probably slightly more declarative than react, at the usual cost of having to learn all the declarations. When I first looked at it, I saw the 'v-' prefix on HTML attributes and just stopped.

Re:Switching From React To Vue.js by moonforeshot on Sunday May 28, 2017 @07:41AM (#14433988)
+1 debugging angular directive was a nightmare... but things might be different with typescript checking on angular-directives...

(but ironically, react-typescript got props checking faster...)

Re:Switching From React To Vue.js by deckar01 on Sunday May 28, 2017 @12:20PM (#14434955)
I recently started forking the github package for atom which is built with react. I found it very confusing that render methods pass scope variables to controllers using directives. The number of times a variable gets passed back and forth from a JavaScript class to a template directive is just silly.
Re:Switching From React To Vue.js by yunyu on Sunday May 28, 2017 @07:39AM (#14433985)
It's fairly straightforward to use JSX with Vue, FWIW. Everything gets compiled down to a render function like React.
Re:Switching From React To Vue.js by dejv on Sunday May 28, 2017 @08:59AM (#14434219)
I did ignored all the modern js frameworks for a long time, so for me Vue is jquery replacement, I like that you can use it in lightweight way and mix it into legacy apps.