Live data from Hacker News

Vue.js: the good, the meh, and the ugly

medium.com

321–330 of 382 posts

Re: Vue.js: the good, the meh, and the ugly

#321

Earlier quoted context omitted.

have you even tried to use TypeScript on a real project to say something like that ?

He's possibly meaning that if you completely rewrite framework it would lead to something like what happened to Angular when it was rewritten and promptly lost huge number of followers/users?

That is amusing because Vue was already rewritten for V2 when they introduced the shadow Dom.

Re: Vue.js: the good, the meh, and the ugly

#322
post #141

This is going to be a drop in the ocean but Vue is the bomb! It made perfect sense, and that's a big compliment for a framework. For me personally it took the MVC into SPA territory, got rid of all the muck that's jQuery and replaced it with a fun, easy to design UIs with platform. If you ask me it's biggest achievement is that it put design, experience and interaction on the same level, literally - thanks to .Vue fi…

+1 for .Vue files. I really like the organization around components and not around file types(.css, .js, .html) within a project's file structure. For me it's an immense time saver knowing exactly which css and javascript was intended for a particular component (using scoped scss for example - which for me is still a pain in the React I use at work).

Re: Vue.js: the good, the meh, and the ugly

#323
post #245

Earlier quoted context omitted.

You can make any suitable variation of the following pattern. You build a DataSource class/prototype with methods such as : - fetch - addChangeListener - removeChangeListener You extend this class for each data type : class CommentsData extends DataSource { // Your custom data source with your data treatment and data getters } And you use the Higher-Order Component pattern: https://reactjs.org/docs/higher-order-compo…

That's just a more Object Oriented Redux (or less, if we consider OOP is originally message passing), and probably without all the connect optimizations. I'm not a fan of Redux either, but I fail to see what problems this approach solves.

What connect optimizations? Redux is quite slow.

Re: Vue.js: the good, the meh, and the ugly

#324
post #56

I really like a lot of things about Vue. I was apprehensive about using JSX when I first started using React, and I also did not like setState. I think the real issue, though, was that I wasn't thinking functionally. I now rarely write a stateful component, and when I do, it's usually once, for the entire application, or maybe for a few large subtrees if the app is very large. State kept alive by parameters is extrem…

It saddens me that JSX became so popular in the React community. I find the syntax verbose and hard to read ... similar to HTML. At my last company we used `react-hyperscript` which was a simple wrapper around `react.createElement`. Ultimately, the React developers made the mistake of making `createElement` so annoying to work with, I assume because they bought into JSX. Granted, JSX might have been necessary when Re…

How is html hard to read?

Re: Vue.js: the good, the meh, and the ugly

#325

We adopted Vue 2 years ago and I've been extremely happy with it. It's very easy to get into, the learning curve is not steep at all, and for the most part it just works. TypeScript support is mediocre. It's supported (Vue will let you use anything) but it's clearly a second class citizen. There's also no real accepted best practices, which the author touches on (where do API calls go). Third party component design v…

I'm curious to know, what about Vue makes it easier to learn than React? It's just a function that takes in data and returns a piece of html. React also just works, and unlike Vue, it's worked for companies like Netflix, Wallmart, Facebook, Instagram, etc that have exceedingly complex requirements and require exceedingly fast rendering. What did you really buy with Vue over React?

Coming from back-end dev, I looked at both. React looked hard to learn because I (thought) had to pick up a huge amount of tooling knowledge. Vue looked easy to learn because its docs promoted a very incremental and piecemeal approach. I didn't need to learn about front-end tooling to build something useful. I started learning Vue. It was easy to learn. I haven't had a compelling reason to try React since then.

Re: Vue.js: the good, the meh, and the ugly

#326
post #323

Earlier quoted context omitted.

That's just a more Object Oriented Redux (or less, if we consider OOP is originally message passing), and probably without all the connect optimizations. I'm not a fan of Redux either, but I fail to see what problems this approach solves.

What connect optimizations? Redux is quite slow.

`connect` does a _lot_ of work to ensure that your own components only re-render when necessary:

- It checks to see if the root Redux state is different than last time, and bails out if it's the same reference under the assumption that nothing changed

- It checks to see if the return values from your `mapState` function are shallow-equality different than last time, and again bails out if they're the same

- The handling for `mapState` and `mapDispatch` is heavily memoized to cut down on unneeded work.

If you have specific performance concerns with a Redux app, please let me know - I'd be happy to offer advice and point you to possible solutions. But, a blanket statement that "Redux is quite slow" is meaningless without context for what's happening.

Re: Vue.js: the good, the meh, and the ugly

#327
post #296
post #279

I'd say today, there is little to no reason for small to medium sized websites to use React instead of Vue.js

For small to medium websites, what benefit does React or Vue have over plain HTML + jQuery?

It’s a framework, meaning it makes a lot of things easy out of the box, if you’re willing to re-implement this stuff or if you don’t need it then html+query all the way

Re: Vue.js: the good, the meh, and the ugly

#328
post #107

Earlier quoted context omitted.

Apart from anecdotal experience telling me that fresh JS devs have a much easier time with Vue than React, I love to still have the option to use it through a simple embed without a build system but can switch to a Webpack/any module bundler if the requirements demand it. The JS ecosystem really has a problem with bloat in my opinion and Vue trumps React in the regard (react eject anyone?).

It's worth noting that React has _always_ been something you could add to an application with just one or two script tags, and the docs were recently updated to emphasize that use case: https://reactjs.org/docs/add-react-to-a-website.html

But writing React without JSX is really not that great in my opinion whereas writing Vue without any preprocessor is totally fine. I know there's the option to use a JSX browser compiler but it's not recommended for production.

Re: Vue.js: the good, the meh, and the ugly

#329

Earlier quoted context omitted.

>Your tree of UI widgets, and >Your tree of data which feeds those widgets Not with a well-designed XML format and XSL-T! But hmm, nobody seems to use that anymore either.

Having done this in the wild a while ago, it seemed to be hard for most of the other developers to do anything complex with it. You either really got it and then could do wonderful things, or you sorta muddled along with it and it was ok but it was like they were wearing a straitjacket. I made a pivot table control out of it, with almost all the logic inside the XLST, it was amazingly fast compared to IE6's javascrip…

> streets ahead

Pierce? Is that you?

Re: Vue.js: the good, the meh, and the ugly

#330
I like that Vue is easy to add to an existing site (ie the new jQuery).

I dislike that Vue feels too much like Vue and its magic and not enough Javascript. With React I feel like writing normal ES6 Javascript.

I love the official Vue documentation and examples.

I am a bit cautious about the ecosystem surrounding Vue. About a year ago when I looked at various interesting projects/tools extending Vue it seemed most of them were in China with very limited English documentation.

Finally the job situation for front-end work. In my region it seems to be about 75% React/20% Angular/5% various(Vue rarely mentioned)

Post reply on HN