News for hackers. Stuff that matters.
Re:Why we chose Vue.js over React by jolux on Sunday December 11, 2016 @11:48AM (#13151846)
I hope I don't get downvoted for asking this but is React going out of fashion already? A lot of the talk about it was "React is here to stay" or "React is as permanent as JS itself" but now this is the second or third time people seem to be going for Vue instead. What happened?
Re:Why we chose Vue.js over React by untog on Sunday December 11, 2016 @01:55PM (#13152485)
"We've been using React for a year and will continue to do so" isn't an article that gets written often, despite there being more people in that boat than switching to Vue.

React is in no way losing popularity. It's just not as interesting to write about something everyone agrees on. That said, React won't be around forever - very little ever is.

Re:Why we chose Vue.js over React by faitswulff on Sunday December 11, 2016 @12:53PM (#13152148)
I think React will be around for a long time. Vue.js may also be an indication that React was on to something, fundamentally. So I wouldn't think of it as heartbreaking that Vue.js is making an impression using some of the same design patterns as React. Javascript framework design may just be converging on an overall theme, with competitive variations. Last I heard, Vue was even working on JSX support.
Re:Why we chose Vue.js over React by _halgari on Sunday December 11, 2016 @02:45PM (#13152754)
React is about the only real framework in the ClojureScript community, via frameworks like Om.Next and Reframe. React in JS is rather clunky since you're dealing with a mutable language that prefers OOP primitives. In ClojureScript most UIs are data-driven and declarative and that's where the strengths of React really shine. So I would argue that ClojureScript turned React into a better React.
Re:Why we chose Vue.js over React by jolux on Sunday December 11, 2016 @02:46PM (#13152757)
I've heard similar from some Clojure fans I know.
Re:Why we chose Vue.js over React by keithnz on Sunday December 11, 2016 @05:57PM (#13153941)
React as it is now isn't going to be React as it is at some future date, it will evolve. Any framework you use has an inherent risk of going stale and being replaced by the next new new thing. Luckily, to get stuff done, you don't need to be using the new new thing, so choose your frameworks based on whether it makes sense for your scenario. Jquery / UI was the rage at one stage, and it still chugs along.

React isn't the only game in town... some other popular ones are :-

Vue

Angular

Elm

All of them have a certain amount of momentum which means, for the short to mid term they are going to be hanging around. But they all have inherent tech risks going forward. It only takes a few innovations browser front end wise to be mainstream to make newer frameworks become the new new thing. For instance things like webassembly / more GUI / vector based GPU accelerated capabilities opens up new ways of putting together apps using all kinds of languages.

Re:Why we chose Vue.js over React by dimal on Sunday December 11, 2016 @03:19PM (#13152962)
I can't see React going away soon. It really does work well, and a lot of the author's problems aren't not unsolvable problems. Some are so easy to solve that many people probably never thought of them as problems (Micro components and forms have never been an issue for me.) The only real issue that I agree about is the excessive typing, but that seems like an adequate trade-off. His complaints about pure functions and immutability seem strange to me, because these aren't abstract concepts that neckbeards like in order to appear smart, they actually make programming easier. My team (about 15 front end devs) built an extremely large, complex app in a relatively short amount of time with React, and it's scaled surprisingly well. At scale, it's not easy, but that's because any huge app is going to be difficult to build.
Re:Why we chose Vue.js over React by sbov on Sunday December 11, 2016 @03:32PM (#13153034)
Yeah, we recently had a co-worker complain about immutability ("it just exists to be a pain in my ass"). I asked to examine his code and sure enough, pointed out that if he mutated the variable it would have created bugs in other chunks of code.
Re:Why we chose Vue.js over React by s_kilk on Sunday December 11, 2016 @04:04PM (#13153203)
We've already been through this in the last few years with Angular.

Anyone who believes their current hot framework is "as permanent as JS itself" is kidding themselves.

Re:Why we chose Vue.js over React by vectorpush on Sunday December 11, 2016 @03:00PM (#13152837)
Who cares? Fashion is not an engineering criteria, you shouldn't be factoring fashion into the question of whether or not a given tool is the right one for the job.

> A lot of the talk about it was "React is here to stay"

Unless Facebook has announced that they are abandoning React, this statement is as true as it ever was at any point in time.

Re:Why we chose Vue.js over React by lilactown on Sunday December 11, 2016 @04:10PM (#13153242)
I think fashion does come into the equation if only because it will be easier to find people who can grok the code base faster since they understand the framework and common idioms associated with it.

Where I work, we just had a bunch of new hires and they're being productive within the first couple weeks because they know React, and our app uses React Native.

React-knowledgeable devs are in high demand right now, which drives smart devs to learn it and garner experience with it, which makes it more desirable to use as a tool in your stack.

Re:Why we chose Vue.js over React by vectorpush on Sunday December 11, 2016 @07:33PM (#13154534)
I disagree. The cost of onboarding a new developer is negligible compared to the cost of picking the wrong stack for a project just because it might be the hippest tool at the time. An experienced programmer can pick up a new framework in a week or two tops and their ability to pick up the application code will have more to do with the quality and documentation of said code than anything else, but if you pick the wrong framework you'll be paying for it for the life of the project (or until you refactor with a new framework and write a blog post about why you decided to switch).

If the tools you're using cause your code to be inherently difficult to grok, then that is an engineering problem, but that has nothing to do with how fashionable the tool might be.

Re:Why we chose Vue.js over React by heysunshine123 on Sunday December 11, 2016 @11:54AM (#13151876)
Well, there's a difference between going out of fashion and being revealed as something that shouldn't be used (like Angular and Ember).

Maybe Vue is just becoming the new shiny.

Re:Why we chose Vue.js over React by sotojuan on Sunday December 11, 2016 @12:53PM (#13152145)
Ember should be used more often. It saves a ton of time with large apps and has really neat plugins like FastBoot. It's underrated.
Re:Why we chose Vue.js over React by c0achmcguirk on Monday December 12, 2016 @12:21AM (#13155755)
I think the pendulum will keep swinging between the minimalists (React/Vue.js) and the frameworks (Ember/Angular).

Ember is completely underrated and overshadowed by React right now. It takes some of the best ideas from React (components, shadow DOM, FastBoot) and puts them in a cohesive framework that has an incredible support ecosystem and upgrade path.

Re:Why we chose Vue.js over React by jolux on Sunday December 11, 2016 @02:24PM (#13152642)
That was my impression too.
Re:Why we chose Vue.js over React by jolux on Sunday December 11, 2016 @12:04PM (#13151925)
So React showed that Angular and Ember shouldn't be used, but Vue is just shinier than React right now?
Re:Why we chose Vue.js over React by iLoch on Sunday December 11, 2016 @12:25PM (#13152025)
No one gets fired for using React. Vue isn't even shinier in my opinion. It makes the same templating mistakes that Angular and Backbone did.
Re:Why we chose Vue.js over React by human_error on Sunday December 11, 2016 @01:46PM (#13152424)
What are those mistakes? I don't do front-end development so my knowledge is very limited with these (I know the names and a basic idea what they do)
Re:Why we chose Vue.js over React by iLoch on Sunday December 11, 2016 @06:21PM (#13154099)
To me, it's the reintroduction of custom templating. I appreciate E4X/JSX syntax because it's just a thin layer of sugar which is compiled to regular JS syntax. It also lacks custom implementations of loops etc, requiring the user to write _Javascript_ not some non-standard templating language.
Re:Why we chose Vue.js over React by rukuu001 on Sunday December 11, 2016 @03:53PM (#13153124)
Facebook is heavily invested in React, so even if the JS fashion industry moves on from it, React isn't going anywhere.