5 ms·
Is this looking a lot like Angular 1.x to anyone else? I've heard it's actually more similar to React but I'm not seeing it... ?
by sync 10y ago
Is this looking a lot like Angular 1.x to anyone else? I've heard it's actually more similar to React but I'm not seeing it... ?
- buremba 10y agoYes, the tag names are even similar but the performance and simplicity is even better than ng2.
- ohstopitu 10y agohere's an link[0] to a comparison with react, angular 1 and others. [0] - https://vuejs.org/v2/guide/comparison.html https://vuejs.org/v2/guide/comparison.html
- k__ 10y agoHm, doesn't seem that much of a win for React users. The performance is compareable, but they went for templates instead of the "it's just JS"-philosophy of React. Reminds me of "the fear of turing complete templates"[0] Also, they mention their bindings are similar to MobX. I had the feeling MobX was a step back in the React eco-system, if I think about what Facebook wanted to achieve with Flux. But yes, overall it seems like a much simpler approach than React or Angular, not to mention Angluar 2, lol. But it seems to come at the cost of the points I mentioned, which were really a pain back in the days and got solved with Flux and JSX. It also doesn't seem to solve some problems that React didn't solve, like realtime asynchronous data or fractal state. [0] http://lhorie.github.io/mithril-blog/getting-over-a-fear-of-turing-complete-templates.html http://lhorie.github.io/mithril-blog/getting-over-a-fear-of-...
- meathook 10y agoYou can use JSX to write your render functions in Vue [0]. It's opt-in as the Vue community views them as overkill in the usual case. Personally, I appreciate having the intuitive approach for templating as the default for people who don't share my encyclopedic knowledge of web development. They can more easily follow along and contribute. [0] https://vuejs.org/v2/guide/render-function#JSX https://vuejs.org/v2/guide/render-function#JSX
- k__ 10y agoI see :) > I appreciate having the intuitive approach for templating as the default for people who don't share my encyclopedic knowledge of web development I always saw it the other way around, haha :) Why should I learn some template language, when JS can do the job and I already know it.
- Touche 10y agoJSX is not JavaScript. If its not in a spec that is ever going to be implemented by a JS runtime, like a browser or Node.js, then it's not JavaScript. It's a superset of JavaScript. If you admit that JSX is a superset of JS then the downsides become readily apparent. Many will still choose JSX and there's nothing wrong with that, but the argument isn't "why would I use X when Y is better".
- k__ 10y agoThe whole point wasn't about this syntax, but about the fact that React templates are just simple nested function. But maybe this would have been more obvious if I used hyperscript instead of JSX as an example.
- Touche 10y agoYou can't ignore syntax, hyperscript isn't very popular.
- SanFranManDan 10y agoIMO JSX is such a simple syntactic sugar around javascript that you can unfold it in your head. > <element someProp={prop} /> = React.createElement('elment', {someProp: prop}, null) Its such a simple transformation and adheres to javascript standard behavior. JSX doesn't add anything new, it just adds a way to do something old. Its a shortcut to 1 transformation and thats it. You can unpack it in your head. So while I agree with you that it isn't "standard javascript", if you look past the visual differences, there is no difference between JSX and javascript. This is in stark contrast to the Vue.js (and other) template systems which, while they compile to javascript, the amount of transformations makes it impossible to extend the template system easily without touching the internals of the template engine. JSX is just syntax, other template systems are entire secondary languages.
- kimshibal 10y agoIf you like JSX, please stick with React.
- k__ 10y agoI think it's okay, makes finding markup in .js files much easier. But I think I prefer t7, because it works 'native'
- misterhtmlcss 10y agoI loved how they did that! They actually invited the other experts to review and feedback on their declarations to ensure their work was honest and had integrity. Never seen that before. Have you? Also I wished it was clear if this doc was updated with Vjs2 or if it's 1.x or what. That's not clear anymore and they need to sort that out or the integrity is lost.. by accident, but still lost.
- ohstopitu 10y agomy respect for the project grew immensely (because it showed me that they really cared and it was not another "me too because I can and I have my own way of doing things" project).
- boxctim 10y agoit uses virtual dom to render and components https://vuejs.org/v2/guide/comparison.html https://vuejs.org/v2/guide/comparison.html
- threatofrain 10y agoIt's like Angular in that they use a similar templating language, and it's like React in that they're using a component-based declarative DOM API.
- nailer 10y agoIf you like the awesome simplicity of Vue, but prefer a more familiar mustache-style templating language with your virtual DOM, try ractive.js from The Guardian. http://www.ractivejs.org/ http://www.ractivejs.org/
- kabes 10y agoAngular also has a component-based declarative DOM API. Always had, but since version 1.5 it's more explicit.
- thejosh 10y agoYou can use it for a page that isn't a SPA for example.
- misterhtmlcss 10y agoThey openly talk about how they took what was successful in those platforms (React and Angular) and others, then built Vue with that in mind. Plus their goal from what I've heard was to also remove what other platforms did poorly (benefiting from hindsight) and hopefully do those things better by learning from their mistakes. Nothing about how they said this was done in a manner that was boisterous, just simply leveraging what has been learned from first movers and now they are hoping to pull their own Apple, by making a better product as second (or third or fourth.....) movers in the market. ;)
- hinkley 10y agoIt's more that many many frameworks imitate Handlebars, or accept that Handlebars is good enough and it's not worth inventing new syntax. If it's your opinion, as it is mine, that HTML frameworks should deal with HTML, instead of abstracting it away, then this isn't a bad thing.