News for hackers. Stuff that matters.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @01:26PM (#17348562)
No one I work with has ever even brought up the possibility of switching from React to Vue, let alone counting Github stars.

Compare to when React came out, it was immediate consensus that we need to switch from Backbone to React. When Angular gained popularity, we did not have an urge to switch because it felt unclear what the scope and direction of Angular actually was.

React (really JSX) solves the single problem of making HTML a part of JavaScript. For me, it's game over, they have solved the problem or came close enough to where I'm comfortable staying in the React ecosystem for the rest of my career.

With React there's no weird "v-if ng-if" template logic that you have to grapple with. To me, Handlebars already gave me enough taste of how horrible and limiting maintaining template logic outside of components is.

Just my take. No desire to even download Vue and try it out, I don't foresee any productivity gains from it.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by jordanlev on Tuesday June 19, 2018 @01:55PM (#17348855)
> React (really JSX) solves the single problem of making HTML a part of JavaScript.

This is the crux of the matter. The people who find Vue appealing (myself included) come from the world of design and html+css markup and jQuery. We're not looking to get html into our JavaScript -- rather we're looking to get JavaScript into our html!

There is absolutely no reason to switch from React to Vue if it's working for you (and I don't think anyone in the Vue community would argue with that). But you came from using backbone -- the people who love Vue I think primarily come from using jQuery. We feel the same way about Vue as you do about React, and that's okay! (btw I also use react and also think it's great)

As for staying in React for the rest of your career -- give yourself more credit and hope you'll be around long enough that this isn't true :)

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by aylmao on Tuesday June 19, 2018 @03:19PM (#17349532)
> The people who find Vue appealing (myself included) come from the world of design and html+css markup and jQuery.

This is something I've noticed-- spot on. Vue seems popular to people coming from the direction of "augmenting their HTML", whereas React is appealing to me precisely because it's all JavaScript.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @02:11PM (#17348999)
Appreciate your comment, it sounds like Vue may be an easier option for you, if you don't want to write JavaScript. However, you should just learn JavaScript, even if you're doing nothing but designing components, will explain why.

I also came from jQuery (Backbone and jQuery was a popular duo, in fact using jQuery in everything was).

The way people wrote apps at one point basically was a stream of jQuery statements, $thing.add('something'), etc.. This created nothing but spaghetti code over time.

Now, we're using React to design extendable components that can be nested, or structured to add more functionality. Check out styled components below to see how much easier it is to combine CSS, HTML into JavaScript. Rebass is built on this as a minimal component library. I know this might be really advanced and you may not adopt any of this, I'm just showing you the latest in what we could be moving toward.

I don't think I would leave React unless JS/HTML/Browsers dramatically changed. The industry is too far into JavaScript code at this point to where I am concerned about job security.

Back to your original point, I don't think Vue would scale well for serious JavaScript heavy apps, so that's why I don't think it's fair to compare it with React, but that's not how it's being discussed, which is some sort of React killer.

[1] https://www.styled-components.com/ [2] https://github.com/jxnblk/rebass

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lhorie on Tuesday June 19, 2018 @03:52PM (#17349793)
> I don't think Vue would scale well

It kinda bothers me when people say X won't scale (implying that React is somehow special in this regard).

For one thing, we're not talking about things like database throughput where you can actually have scalability bottlenecks.

If we want to talk about scaling maintainability, React is definitely not much of a poster child either, compared to other solutions I've used over the years. We got a new context API only recently to deal with concerns Angular had already accounted for years ago, and things like the Enzyme adapter state of the world is pretty terrible - and don't even get me started on React Router migrations :)

IMHO, one major thing Vue did right that React didn't which has an impact on scaling maintainability is that Vue owns its most important peripherals (data management via vuex, styling via single file components, animations, etc). In my experience, the React model (also adopted by webpack and babel) is a real pain in the ass to support at scale as a web platform engineer, because many times you're at the mercy of some random dude with no connection to the core project and you end up having to settle with bizarre makeshift configurations, fork things or do other nasty things to get around random design direction changes.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by codegladiator on Tuesday June 19, 2018 @02:24PM (#17349115)
> However, you should just learn JavaScript, even if you're doing nothing but designing components, will explain why.

I think you are reading wrong between the lines. There are no vue users who dont know javascript or are not using with it. The concern is really how are you mixing the two. vue is more of js inside html, while react is html inside js.

And its just a matter of opinion. I work on both vue and react apps and personally dislike writing html inside js. But if the project started earlier using react, I am not going to suggest a rewrite just because of this single preference.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by jordanlev on Tuesday June 19, 2018 @02:37PM (#17349200)
lol, I've been a javascript developer (among other things) for over 15 years :)

The point is that some people/teams/environments prefer to not treat everything as a javascript app. Especially in the agency world -- thinking about one's website from a markup/design-first perspective is a totally viable thing. And if you have designers on your team (or for solo practitioners) you sometimes don't want to javascript all the things. It's great that you found an approach that works for you, but it doesn't mean that it's the only best way for everyone and every situation.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by amelius on Tuesday June 19, 2018 @01:44PM (#17348735)
> With React there's no weird "v-if ng-if" template logic that you have to grapple with.

Yes, I hate that syntax. It's like they picked the worst from HTML and Javascript. Instead "if" statements should be dealt with in Javascript entirely.

It's one of the reasons why I don't use Vue.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by jaequery on Tuesday June 19, 2018 @01:55PM (#17348853)
that was how i felt too which was the same reason i disliked angular. but vue's templating syntax have turned out to be really enjoyable to use. it made me think how wrong i was of my initial impression of vue. you have to give it a try to understand it.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by amelius on Tuesday June 19, 2018 @02:39PM (#17349212)
Sorry, I appreciate your enthusiasm, but I just can't imagine how shoehorning a language into XML could ever be a good idea.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by jaequery on Tuesday June 19, 2018 @07:52PM (#17351251)
thats how i felt too, and i'm now a big fan of vue. its funny how that works.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by amelius on Wednesday June 20, 2018 @05:43AM (#17353835)
Ok. I wish you could say a little more about why, though.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by dmitriid on Tuesday June 19, 2018 @02:53PM (#17349313)
There’s nothing enjoyable about Vue’s syntax. It’s not really HTML, and not really Javascript (it’s Javascript-like ... sometimes). Same goes for Angular, Polymer and Svelte.

And on the Javascript side Vue actually breaks existing assumptions about code. For example, it hoists methods and properties and makes `this` available where it can’t be available.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by serpix on Tuesday June 19, 2018 @02:12PM (#17349008)
how do you access nested properties in Vue templates?

You can't do a.b.c if b is undefined and instead need to wrap it into satanic template extensions

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by bigtunacan on Tuesday June 19, 2018 @04:08PM (#17349914)
When logic starts to get too complicated you have the option to move it into a render function; you can even use JSX if that's your thing.

One of the nice things about Vue IMHO is how it leaves more flexibility to the developer to choose the right path.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @01:50PM (#17348806)
I also wanted to make an additional comment expressing my frustration with the consistently negative comments on posts like this about JS Frameworks.

These commenters, those who see React as "just another JS Framework" and whom see JavaScript developers as people who would change JS Frameworks as if they were ordering a new drink at Starbucks: These people are the epitome of amateur.

Building web apps has been my career for nearly a decade. If you think entire teams would just up and switch to a new JS framework tomorrow because of a Medium article, or because of Github stars, you don't understand how the industry works at all.

React is not a fashion statement, it's an evolved paradigm shift in the web. Vue is not, it looks like Angular and Handlebars, the way apps were built 5 years ago, it adds nothing to the industry but more bloat and distracting people from using React.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by brightball on Tuesday June 19, 2018 @02:21PM (#17349080)
Personally, I view it as a case of right-tool-for-the-job vs the-one-true-way.

The core of the matter boils down to one thing...everything on the web doesn't need to be an SPA because most things are open, check, close experiences.

For the things that don't need to be an SPA, where a server side app serving HTML is a significantly faster user experience and dropping in a small bit of JS here and there is the right approach...Vue makes sense. This is the same place that jQuery makes sense because it makes the goal simple.

For the places where you do need an SPA because the user is going to be opening your site/app and working within it for a while...absolutely...use React. If that's going to translate to a native application, even more so...use React.

The concern is that Single Page Apps with React are gaining the hammer-and-everything-is-a-nail experience...when really only a few things are nails and most things are actually screws.

Just pick the right tool for the job without all of the zealotry, like suggesting anything that is not react distracts people from using react.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by mythrwy on Tuesday June 19, 2018 @02:03PM (#17348935)
Thus spoke the priest of the inquisition confronting heretics distracting from the one true way:)

I personally had a lot of trouble with React, I didn't care for it, it was too foreign, too invasive.

Vue on the other hand just clicked nicely and appeared a thing of simplicity and beauty.

But admittedly I'm a wanton sinner. Who also don't care for Facebook products no matter how great and open and popular they are.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @02:17PM (#17349052)
React was created by Jordan Walke, a software engineer at Facebook. Facebook had a good reputation at the time, and so we forgive Jordan's divine genius for that slight error in career choice.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by tomc1985 on Tuesday June 19, 2018 @02:38PM (#17349210)
It's grand pronouncements like that that epitomize amateurishness. I am so sick of seeing people complain about how things are being X years ago, as if old techniques somehow magically become invalid. Maybe they seem so bad because the practitioner sucked at that time.

React doesn't really respect separation of concerns, and it's rare to find an SPA (and now, desktop apps -- thanks Electron!) that isn't complete garbage. Disciplined approach with battle-tested techniques creates much higher-quality software, every time.

Also, "paradigm shift" is nonsense. The web is a platform -- fetishizing specific tools and techniques is foolish. There are many ways to skin a cat.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @02:44PM (#17349256)
You're right! I'm sure there's plenty of high-grade apps still out there that are built on jQuery plugin spaghetti code. No problem with that at all. No reason to criticize that either in any way shape or form. jQuery spaghetti is still a perfectly delicious way to enjoy a web app. Who doesn't love spaghetti?
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by tomc1985 on Tuesday June 19, 2018 @02:47PM (#17349272)
Dude if your jQuery is spaghetti that's on you
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by crooked-v on Tuesday June 19, 2018 @01:35PM (#17348652)
To me, React also has the killer feature of being "generic enough" that I can see directly migrate-able variants of it still being used in ten years. The backend may change, but the basic setup of JSX -> function transpiling with param-attribute equivalency is simple enough to be a new foundational structure.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by baddox on Tuesday June 19, 2018 @02:44PM (#17349254)
That's a big one for me, particularly with the way I prefer to write all my React components: as stateless functional components (just a function that takes props as its only argument and returns some JSX). For adding state, lifecycle methods, etc. I'm using recompose, which is also generic enough that I could easily see myself reimplementing it for some future view library.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @01:57PM (#17348870)
Yep, React seems to have been built from the beginning as a new foundation. It leveraged ES6 features just as they were coming out, so we got to learn a new way to write JavaScript and HTML at the same time.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by max_im on Tuesday June 19, 2018 @02:14PM (#17349029)
As someone who has built with both professionally, I'd say you're spot on. Vue has been great to work with because its readability and low-barrier to get started, but nothing beats writing plain-old JavaScript with some JSX. Not to mention, Vue can get really hairy with something as simple as passing props between components while React makes that a breeze.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by Canadauni on Tuesday June 19, 2018 @02:42PM (#17349233)
Just to note you can use render functions and write jsx in Vue :) https://vuejs.org/v2/guide/render-function.html
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by threatofrain on Tuesday June 19, 2018 @03:11PM (#17349462)
But every time I ask about that, I get crickets. So who here is using JSX in Vue?
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @07:08PM (#17351008)
Also curious about why someone would choose Vue/JSX over React. My argument is essentially in favor of JSX, if Vue or something else uses JSX in a more interesting way or creates something better than JSX, that's cool.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by bdchauvette on Tuesday June 19, 2018 @08:44PM (#17351500)
I did once, about 18 months ago.

A couple of problems I remember having:

- Not all features (e.g. most built in directives) work in JSX, and some 3rd party libs didn't work at all as JSX components.

- The JSX isn't a direct mapping to the object properties in `createElement`, which is how (almost?) every other flavor of JSX works. This means you don't just have to learn the the low-level `createElement` API, you also have to learn how that API maps to JSX. [1]

For example, you can't do `<div domProps={{ innerHTML: 'foobar' }} />`, which you might expect if you just read the `createElement` docs. Instead, you have to use `<div domPropsInnerHTML="foobar" />` (but note that not all `domProps` actually need the prefix [2]). Likewise, event handlers use an `onEvent` camel case convention that maps to the `on` property in `createElement`, which is kinda nice because that's how you add event handlers in other JSX flavors. However, it also means that if a Vue component accepts an `onSomething` prop, you actually have to do something like `propsOnSomething` [3] in JSX, because passing just `onSomething` would convert it to `on: { something: ... }` instead of `props: { onSomething: ... }`.

Overall, when I was trying to use JSX with Vue, it very much felt like a second-class feature, tacked on primarily (if not exclusively) to help convert people from React. However, Vue's flavor of JSX doesn't seem to appreciate that the simplicity of how React maps JSX to `React.createElement` is a large part of its brilliance.

In other words, I think that Vue's flavor of JSX introduces just enough magic to make it confusing. It sacrifices consistency for haphazard ergonomics, making the experience frustrating for someone used to JSX being just an XML-like alternative syntax for `createElement` (or `h` or `m`). I think Vue's JSX would be much better if it didn't try to do any magic, and just forced people to write stuff like `<button on={{ click: () => {} }} />` instead.

In the end, I gave up on using JSX with Vue, tried templates for a bit, didn't like them, and moved away from Vue altogether.

Caveat lector: Things might be a lot better now. I tried to read up a bit to see, but I didn't dig very deeply.

---

[1]: https://github.com/vuejs/babel-plugin-transform-vue-jsx#diff...

[2]: But note that not all `domProps` actually need the prefix, either: https://github.com/vuejs/babel-plugin-transform-vue-jsx/pull...

[3]: This actually used to be impossible when I was trying Vue and JSX. It was only added somewhat recently: https://github.com/vuejs/babel-plugin-transform-vue-jsx/pull...

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by anonytrary on Tuesday June 19, 2018 @01:41PM (#17348711)
This is pretty much exactly how I feel. There has been a lot of "anti-React" virtue signaling in the Javascript community over the past few years, and I just don't get it. Why is your whole front-end team switching from React to X, where React - X ~ epsilon? If it ain't broke, don't fix it. If you're switching from jQuery or templates to X, it is more reasonable, but I've seen teams rewrite Angular and React codebases in Vue (i.e. "we're hip and modern now").

In my experience, React's API has been far more intuitive than directive-based frameworks, and switching between the various directive-based frameworks seems like too much work for too little change. I would be interested in frameworks which aim to mimic React's API but offer more in terms of size (smaller is better) and performance. This is why I closely watch projects like Preact.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by benatkin on Tuesday June 19, 2018 @02:00PM (#17348919)
What do you mean by virtue signaling, and how should they defend their choice without virtue signaling?

Is it possible that some just prefer to use something that feels closer to the W3C standards?

Or is the virtue signaling about it being a facebook project, with facebook being a threat to the open web? Angular is a google project, but I've heard some say that since Evan You used to work for google it's sort of like it's a google project, which I disagree with. The clear winner of the three for being independent of FAAMG is Vue. Angular at least has its own GitHub organization that makes it a bit less blatant of an ad for its corporate steward (remember io.js and the movement to get Node moved out of Joyent to a foundation?).

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by anonytrary on Tuesday June 19, 2018 @03:40PM (#17349679)
Maybe I was being hyperbolic, but it could refer to any or all of the following:

  1. The W3C standards convention
  2. Being a product of Facebook
  3. The old license being restrictive
  4. Too much hype around the framework
I'm positive I've seen people conjure these reasons before. I was deterred from React mainly for the third reason. When they fixed their license, I felt no need to pursue alternatives. I've played around with Vue a bit, and I just wasn't compelled enough to switch to it. It seemed like a solved problem already. The only thing that will get me to switch from React is a 2x in performance and/or a 10x reduction in complexity or size.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by benatkin on Tuesday June 19, 2018 @06:55PM (#17350936)
Those are all very good reasons, especially #3. It's part of React's track record and you don't have to look far to see other similarities to it. It isn't a sign of being a responsive to their userbase because they waited until the inventor of the world's most popular website publishing platform complained about it.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by Jach on Tuesday June 19, 2018 @02:34PM (#17349178)
I don't see it as virtue-signaling but I do think there are three distinct JS communities, even if they overlap a lot, and sometimes they take swipes at each other. Maybe someone can point out more? The three I'm thinking of are 1) the classic webmaster group, aimed at building dynamic and interactive websites 2) the SPA group, making webapps, also extending into things like React-Native, but the web is just a delivery medium for their app 3) the backend group with Node, aiming at the types of things you'd otherwise have used PHP/Ruby/Python for.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by macleodnine on Tuesday June 19, 2018 @01:54PM (#17348848)
I agree, and Preact is fantastic! Not only is it very fast and light, but so is the community
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by yayana on Tuesday June 19, 2018 @01:44PM (#17348734)
I find the whole premise of putting the html in JavaScript bizarre and I think it is a passing fashion while the various debates around web components and shadow DOM isolation get sorted out.

I would hope my graphic artist will eventually be mixing 3 layers of HTML elements that seem entirely standard to him except the 3 different sources of docs.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by city41 on Tuesday June 19, 2018 @02:59PM (#17349364)
JSX isn't really an abstraction over HTML, it's an abstraction over document.createElement and the other related DOM APIs. I always liked it because that's really what is happening, JS is causing HTML elements to be created via those APIs. We aren't feeding the browser html files for it to parse.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @01:57PM (#17348879)
The only bizarre thing is the HTML was ever separate from JavaScript in the first place.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by yayana on Tuesday June 19, 2018 @02:08PM (#17348975)
How is that bizarre? Trying to enforce MVC is done even when it is a lost cause.. But you properly separate html, css and (arbitrary Code language to be replaced by transpiling) and all you hear is "I wish my graphic artist had to understand all of this and what a compiler does before he could fix my poor UX ideas.. and my copywriter should have to find my spelling mistakes using an IDE too."

If my graphic artist expected me to go into Adobe every time I needed a new background, I would ask him what his job was.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @02:38PM (#17349205)
It sounds like you're coming from a landing page/blog/Wordpress background. I'm primarily building data-driven apps, like financial data or dashboards. My UX/UI people don't come near my code, and I wouldn't want them to.

For me, every time I need a new button, I'm not going to my designer, I'm just copying over the last button. So I need to be able to quickly edit styles, and state functionality, like dropdowns and date pickers. For these types of components, your life will be a living hell if every time you needed to add a style, you were going to a CSS/HTML file. This was how we first worked with Backbone and Handlebars, and it absolutely sucked.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by yayana on Tuesday June 19, 2018 @03:02PM (#17349392)
I see just enough of landingpages and corporate customers and multilingual to see why most of these frameworks ship with toy features when it comes to the lifecycle of the overall site. Then you end up with two parts (a site in so.e kind of CMS and a compiled SPA) that have to look kind of alike where they can only sort of edit one..

Handlebars is just a general text template language so it was naturaly quite rough. From there one can move to dressing components in the angular style and keep the templates all in one folder and the custom CSS in one file.

My designer and I share the templates folder, I usually add enough attributes for bootstrap to do something or other and then the custom CSS is his and the code is mine.

If we were writing our SPAs for consulting clients it would be essential that the templates and CSS were not compiled so they could go on with them without us and without either paying us to keep a bunch of unstable node tooling able to compile and up to date or feeling like we intentionally snuck a time bomb into the project and are underhanded in seeking hours.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by goatlover on Tuesday June 19, 2018 @09:47PM (#17351821)
That's probably because HTML came first, and the web was meant to be a document sharing platform, not an app environment for everything under the sun. Anyway, people were mixing the PHP with their HTML long before everything got rewritten in JS. The whole argument over what constitutes proper separation of concerns probably proceeds Smalltalk and MVC.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by dmitriid on Tuesday June 19, 2018 @03:02PM (#17349386)
> the various debates around web components and shadow DOM isolation get sorted out.

They won’t. jQuery was a much simpler concept and basically a fluent wrapper around a lot of existing APIs.

11 years later none of the browser APIs are not nearly as easy to use or powerful as jQuery. (Did you know that querySelectorAll returns an object that, unlike jQuery, isn’t an array and doesn’t have the same APIs? They added frigging .forEach to it only a few years ago).

Components are a more complex concept. You need data binding, and virtual DOMs (to prevent out-of-order janky updates to the DOM), and templating, and a solution for both global and isolated CSS, and..., and..., and...

These issues won’t be solved in the next 50 years. And that’s the reason no one uses (or talks about) vanilla WebComponents. Everyone is using any of the dozens of wrappers or frameworks on top of them.

Edit: added missing not in not nearly as easy

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by gaius on Tuesday June 19, 2018 @02:10PM (#17348984)
I'm comfortable staying in the React ecosystem for the rest of my career.

You won’t have that option. No one has had it with their favourite tech for decades now. Hell I’d still be writing Motif code if I could. Unless you are 2 years from retirement in which case, enjoy!

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @02:34PM (#17349183)
2008 is more similar to 2018 than it is to 1998. I will wager that 2028 more similar to 2018 than 2018 was to 2008.

Doesn't look like there's a future appearing where we strap on our Magic Leap and wave our hands around and suddenly single page apps appear.

I'm giving my opinion that React ecosystem will stay around for an absurd amount of time because unlike jQuery, the size of the community and usability of the tool scales really well. Maybe people said the same thing about Rails, or Motif, but I just feel like React is the end of the line for whatever we're doing here.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by gaius on Tuesday June 19, 2018 @05:31PM (#17350434)
See if the question is how do you host an application on a server and run thin clients with local rendering and some limited local interactivity... then that problem keeps getting solved over and over again. X11/Motif and “React running in the browser” are fundamentally the same thing. Every solution actually works pretty well, fulfilling all use cases. Then for no reason we chuck it all away and start again.

All of this has happened before and will happen again

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by dereke on Tuesday June 19, 2018 @03:09PM (#17349449)
> With React there's no weird "v-if ng-if" template logic that you have to grapple with. To me, Handlebars already gave me enough taste of how horrible and limiting maintaining template logic outside of components is.

React was a good step in the right direction. But IMO they lost the plot with things like:

- shouldComponentUpdate(nextProps, nextState)

- componentDidUpdate(prevProps, prevState, snapshot)

and the whole props vs state thing. This adds so much unnecessary complexity to the code base.

Thankfully I can get all the benefits of the react style without any of the awkwardness of its API with hyperdom

https://github.com/featurist/hyperdom

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by ehnto on Tuesday June 19, 2018 @01:39PM (#17348696)
> React (really JSX) solves the single problem of making HTML a part of JavaScript

The reason I like the way Vue works is because it makes javascript part of the HTML definition (with component definitions), essentially the opposite of what you like about React. That said, my use case of Vue is very different to my use case for React. Even though Vue does essentially solve the same problem set, their approaches have pros and cons in different scenarios.

(all that said I typically don't need to use either for what I do, in preference of light vanilla JS classes)

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by macleodnine on Tuesday June 19, 2018 @01:53PM (#17348829)
Could you elaborate on the different use cases for each? I don't know enough about vue to spot them myself
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by ehnto on Wednesday June 20, 2018 @12:40AM (#17352615)
My use case where Vue fits better is in lots of isolated reusable components that aren't tied to a global state. So an image slider or datepicker for example.

But I would consider React and Vue for building a larger scale, stateful application like Spotify or Slack.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by smdz on Tuesday June 19, 2018 @01:53PM (#17348836)
>When Angular gained popularity, we did not have an urge to switch because it felt unclear what the scope and direction of Angular actually was.

I do not remember React coming in before Angular. I loved Angular1. But Angular2 made me very uncomfortable and thats when I switched to React. And I'm not looking back. Even if I need a very simple drop-in not-transpiled solution without the React tooling - I always fall back to Angular1 instead of using Vue. Fortunately I have no regrets moving to React.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by lsalvatore on Tuesday June 19, 2018 @02:41PM (#17349228)
Sorry, I told the story out of order, we saw Angular and passed on it.

Also have no regrets or issues with React. Been 3 years now and I have no complaints or frustrations with my job anymore, compared to the horror of adding jQuery plugins.

Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by benatkin on Tuesday June 19, 2018 @01:46PM (#17348763)
With Vue and Angular you don't have to deal with controlled components, and you don't have to figure out how to mix JavaScript expressions with JSX expressions (sometimes it gets ugly).
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by dmitriid on Tuesday June 19, 2018 @03:05PM (#17349412)
In Vue and Angular you only need to figure out how to mix Javascript-like expressions with HTML-like templating language:

    <ul id="example-1">
      <li v-for="item in items">
        {{ item.message }}
      </li>
    </ul>
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by benatkin on Tuesday June 19, 2018 @07:24PM (#17351114)
Pretty slick. It isn't fundamentally different from *ngFor in Angular (with let to declare the variable), but the details make it much more pleasant.
Re:GitHub Stars !== Usage: React Is Still Blowing Vue and An... by dmitriid on Tuesday June 19, 2018 @11:53PM (#17352452)
Not slicker than JSX, definitely. It’s not HTML, it’s not Javascript.

As code goes in complexity Vue quickly becomes ... let’s call it weird: https://mobile.twitter.com/dmitriid/status/98777166684669952...

Javascript-like scripting in strings? Check. Different versions of HTML-like attributes? Check. Magic binding of all that to specific structures in JS code? Check.

But please, do tell me how it’s beter than React where you “have to figure out how to mix JavaScript expressions with JSX expressions (sometimes it gets ugly).”