3 ms·
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 chil
by cormacrelf 9y ago
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.
- yunyu 9y agoIt's fairly straightforward to use JSX with Vue, FWIW. Everything gets compiled down to a render function like React.
- moonforeshot 9y ago+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...)
- deckar01 9y agoI 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.