News for hackers. Stuff that matters.
Re:The State of JavaScript 2017 by wcarron on Tuesday December 12, 2017 @11:51PM (#15912100)
v-directives are just a bridge for old angular.js developers to jsx and render functions. Vue supports both.
Re:The State of JavaScript 2017 by yen223 on Wednesday December 13, 2017 @12:01AM (#15912141)
Not saying that you're wrong, but the docs sure seem to imply that directives are the way to go: https://vuejs.org/v2/guide/index.html#Declarative-Rendering
Re:The State of JavaScript 2017 by wcarron on Wednesday December 13, 2017 @10:49AM (#15914955)
Yeah, that was my own personal opinion prefacing the facts. Vue supports both, but the template system is generally used more in the Vue ecosystem than JSX is. Vue neatly fits between JSX and angular.js' clunky template language. Since the developer can quickly understand that Vue and React are both doing the same thing underneath, he can pick his preferred way to do it (template vs render func). I see in passing that more experienced devs I've worked with prefer the react way at a higher rate than those of less experience do. But mostly, you're right that v-directives are vastly more popular.
Re:The State of JavaScript 2017 by threatofrain on Wednesday December 13, 2017 @02:19AM (#15912618)
Every time I ask about people's JSX experiences in Vue I hear very little.
Re:The State of JavaScript 2017 by mtpn on Wednesday December 13, 2017 @06:09AM (#15913498)
I came to vue liking JSX pretty well, but it does seem that culturally (or maybe just among newer developers like me) the single-file component with directives in the markup is more popular. Especially in tutorials. I haven’t really felt any pain with the default vue tenplating style that made me think switching to JSX again would be useful to me.