Live data from Hacker News

Vue.js is Wikimedia Foundation's future JavaScript framework

lists.wikimedia.org

41–50 of 204 posts

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#42

Earlier quoted context omitted.

> you had to wrap your components into x number of HOCs to inject the props your component needed, risking props collision, making it really hard to debug... What kind of application are you developing? Do you have complex UI? Or just lots and lots of pages where you reuse components a lot?

The kind of app that has 60k LOC, dozen of pages, makes 15 fetches per page (e.g. a report with 5 charts and 3 series per chart), reuse data between pages to avoid remaking the same fetches, have 1 or 2 forms synchronized between every page (like dates and selects filters), save the filters into the URL query params to be able to share the report and restore it when you open/refresh the app, and so on. You end up wit…

Your example would be considerably simpler if you had separation of concerns [1]. You have routing, data fetching, redux, visual components, all in that small snippet. Sadly React devs seem to do this all the time... its like they have never heard of MVC.

[1] https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#43
post #25

Earlier quoted context omitted.

React does not seem like a good fit for doing any of these things. Aside from keyboard navigation, which works just fine as far as I’ve seen. I dunno, every time I see someone hating React they’ve been kind of stuck in doing things the jQuery way, and their components become this horrible frankenstein of modifying HTML both through React and directly.

Keyboard navigations as in up/left/right/down jumps around somewhat haphazardly placed items. Not tab/shift-tab accessibility. And you are right that React is not a good fit for these things. That's why I say it's very limiting. Also, for what it's worth, you might be mistaking "the jquery way" with "the vanilla way." As in: - working with HTMLElements - vs working with a superset (tsx) of a superset (ts) of javascri…

Yeah, React is a pain for when you need to interact with the DOM elements themselves. If you want to add some logic based on where the element happens to be placed, instead of where you have told React to place your element, you're in for a headache. Now the DOM is one source of state (positioning) and your store (Redux or otherwise) is no longer the single source of truth.

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#44
post #37

Earlier quoted context omitted.

Svelte is very new (a year and half of meaningful adoption). React, Angular, Vue.js are the most popular, in that order. I hate to say might=right, but for a project like Wikimedia, choosing a mature, popular framework is important.

What happened to emberjs? It was poised to become the next big thing after react and angular and suddenly nobody talks about it anymore.

It was the 3rd most popular in 2016, and 4th most popular in 2017-2018.

It didn't go anywhere. Vue.js just became more popular for whatever reason.

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#45
post #38

Earlier quoted context omitted.

Are you trolling? I’ve used Vue in a couple of projects and honestly have no idea what you are talking about. Feel free to expand on your statements. Otherwise this message doesn’t fit in hn

The shift to Vue3 and a new paradigm (composition API) left the community in a state of confusion of where/how/when to migrate. The old paradigm is still supported but more like a legacy layer than the way to go. It reminds me of the python 2-3 schism.

I'm part of the community, several big production projects, several migrations from v2 to v3.

I was never confused.

The backward compatibility has a clean plan. For the bits that were complex changes, it was possible to do partial upgrades. From the beginning, the partial upgrade was in consideration. There was always early documentation, and you have access to v3 in alpha and beta all the time with complete documentation and complete guides. You also have standalone packages to start testing migrating bits of v3 to v2, like the composition API, class components, etc. It was one of the most seamless transitions I experience.

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#46

Earlier quoted context omitted.

The kind of app that has 60k LOC, dozen of pages, makes 15 fetches per page (e.g. a report with 5 charts and 3 series per chart), reuse data between pages to avoid remaking the same fetches, have 1 or 2 forms synchronized between every page (like dates and selects filters), save the filters into the URL query params to be able to share the report and restore it when you open/refresh the app, and so on. You end up wit…

Your example would be considerably simpler if you had separation of concerns [1]. You have routing, data fetching, redux, visual components, all in that small snippet. Sadly React devs seem to do this all the time... its like they have never heard of MVC. [1] https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

I suggest searching what each of those HOCs is doing. This code is not dealing with routing, fetching, managing state or rendering. It is merely "gluing" those things together. Doing that can be considered a "single concern".

Over-splitting things only makes them worse to read and understand, even though each sub-component is prettier to look at.

Also notice there's a disclaimer on your linked article here the author retracts the recommendation.

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#47
post #4

Congratulations to the Vue team, this is definitely a big win for them. Reading through the RFC is really interesting. They specifically call out the dependency on Facebook as effectively being React's Single Point of Failure, citing their negative experiences with HHVM. And for all of the love that people give React's big shifts (like hooks), the RFC specifically counts this against them, given that best practices h…

Although I understand what you saying about big shifts and kinda shared your opinion, specially about hooks, I started a new project from scratch last week and decided to give hooks a try (and, for reference, I've been using React on a daily basis for 5 years). Oh boy I was wrong. Hooks are way more easier and intuitive than what I thought. It makes code so much more readable and easier to reason about. Especially wh…

Yeah this is true, everyone doesn't like change in the beginning. but once I started using hooks for a couple of weeks, it is amazing to see that my productivity is increased a lot

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#48

Earlier quoted context omitted.

The kind of app that has 60k LOC, dozen of pages, makes 15 fetches per page (e.g. a report with 5 charts and 3 series per chart), reuse data between pages to avoid remaking the same fetches, have 1 or 2 forms synchronized between every page (like dates and selects filters), save the filters into the URL query params to be able to share the report and restore it when you open/refresh the app, and so on. You end up wit…

Your example would be considerably simpler if you had separation of concerns [1]. You have routing, data fetching, redux, visual components, all in that small snippet. Sadly React devs seem to do this all the time... its like they have never heard of MVC. [1] https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

The snippet illustrates exactly the concepts described in the article you linked.

And you are talking about MVC but that's kinda what is going on here: a bunch of smart components are injecting data ("model") and methods ("controller") into a dumb component ("view"), which displays them and calls them when some events are triggered (e.g. mount, change, clicks, submit, etc).

Re: Vue.js is Wikimedia Foundation's future JavaScript framework

#49

Good luck getting any libraries working. Good luck using graphql. Good luck getting the tooling stable. Good luck getting a PR on the main code base done. Vue in production is a minefield of nightmares. Rather have Facebook as a single point of failure than some random dude who has other things that consume his interest.

I'm not sure a lot of people realize just how much a lot of the ecosystem relies on and is constrained by Evan
Post reply on HN