5 ms·
gotta say, the vue example looks simpler and cleaner....also I notice you seem to be using the most verbose syntax for vue.
by keithnz 7y ago
gotta say, the vue example looks simpler and cleaner....also I notice you seem to be using the most verbose syntax for vue.
- ng12 7y agoI completely disagree on first note, mostly because it's almost all JavaScript. There's very little "React" there. On the second note it's copy-pasted code from the official Vue docs.
- keithnz 7y agothe best way to describe a UI is in javascript? huh... I wonder why people keep creating markup style languages to abstract away from programming languages for UIs? Basically if you are describing your UI in javascript, maybe that's not a good thing.
- ng12 7y agoI don't really understand what you're talking about. For building a dynamic UI you need JavaScript (or another programming language). Both React and Vue use JavaScript to build their dynamic views. If you're not building a dynamic UI then you don't need either tool.
- keithnz 7y agoIn react that's mostly true, in Vue (and things like WPF) there's a two layers essentially, markup to create bindings to reactive data, and code to define the reactive data ( though vue does let you blur the lines)
- ng12 7y ago> markup to create bindings to reactive data Right, and my argument is building this in JavaScript directly (rather than a HTML-ish/JavaScript-ish template language that gets converted into JavaScript) is a better model.
- keithnz 7y ago@ng12 right, you made a claim, I'm just saying, your claim seems unconvincing, and the example you gave doesn't seem to make for good evidence of your claim.
- ng12 7y agoYou're not making it clear why it's unconvincing. Let me summarize my post: Vue had to fundamentally introduce a new concept (which developers, myself included, find confusing [1]) to solve a problem you can easily solve in React without any additional APIs. React does this very much by design [2] and it's a huge part of the reason why I like it more than Vue. 1. https://vuejsdevelopers.com/2017/10/02/vue-js-scoped-slots/ https://vuejsdevelopers.com/2017/10/02/vue-js-scoped-slots/ 2. https://2014.jsconf.eu/speakers/sebastian-markbage-minimal-api-surface-area-learning-patterns-instead-of-frameworks.html https://2014.jsconf.eu/speakers/sebastian-markbage-minimal-a...
- ratww 7y agoThis only makes sense for people who learned to program using React and only ever programmed in it. Not saying that's your case. Vue.js uses templates, and the idea of slots already existed in other template languages for years. Angular, ERB/Rails, Razor, Django, Handlebars, Jinja, WPF, even some wikis: all those have the same concept, maybe implemented diferently. On the other hand, React uses JSX, which is novel and wasn't really used anywhere else before. JSX also has the disadvantage of requiring a very complex toolchain (Babel and Webpack etc), something that Vue.js doesn't require.
- ng12 7y agoIf all the other frameworks jumped off a bridge, would yours jump too? :) The real win here, even if you're familiar with other template solutions, is that you never have to ask the question "How do I do X in template solution Y?". React's JSX "templates" can be fully described in a single sentence: write some (X)HTML and use curly brackets to insert a JavaScript statement that evaluates to a primitive. There are no other concepts to learn provided you know JS and HTML -- and having spent lots of time introducing React to developers of various levels of front-end experience that's something I've come to really appreciate.
- Scarbutt 7y agoIs that MVVM or like Razor in asp.net core?