Live data from Hacker News

Am I wrong in hating React JS?

medium.com

1–10 of 40 posts

Re: Am I wrong in hating React JS?

#2
Is React a fad?

Yes.

Is it here to stay?

Yes.

Should I get into it?

Depends on what you need. If you are building a web application with complicated UX needs (protip: you probably aren't) and/or the team insists on React, you probably need React. If you want an easy time getting a job in the Bay Area right now, you probably need React. If you want to avoid having your comments downvoted on HN, you probably need React.

So, it depends.

Re: Am I wrong in hating React JS?

#4

Is React a fad? Yes. Is it here to stay? Yes. Should I get into it? Depends on what you need. If you are building a web application with complicated UX needs (protip: you probably aren't) and/or the team insists on React, you probably need React. If you want an easy time getting a job in the Bay Area right now, you probably need React. If you want to avoid having your comments downvoted on HN, you probably need React…

"If you want to avoid having your comments downvoted on HN, you probably need React."

lol :)

Re: Am I wrong in hating React JS?

#6
To reply to your complaints:

> I hate html in javascript. I hate JSX.

At least it's just HTML and JavaScript.

In my opinion it's better than learning a new messy templating DSL, i.e.

    
        
            {{::item.name}}
        
    

    
    
> I hate the lack of CLI. I hate the ridiculous amount of shit I have to do to simply get a project started.

You can use the official Create React App CLI [1].

> I hate the sheer amount of boilerplate code and the verbosity.

How do you recreate the following component in Ember/Angular/Backbone/jQuery/FoobarJs with less boilerplate and verbosity?

    Header.js:

    import React from 'react';
    import Icon from './Icon';

    export default ({ icon, title, subTitle }) => (
      
         {title}
        

{subTitle}

);
> I hate the lack of conventions — every project I look at looks different, every blog post looks different.

React is just a library to build views, so there is not a single way to build your app in the React world. You can use Redux, MobX, Flux or whatever you want to manage your data. You can even do it in 100% raw vanilla JS. I think it's great.

---

[1] https://github.com/facebookincubator/create-react-app

Re: Am I wrong in hating React JS?

#7
I kind of feel this way about React, but I feel even more strongly this way about Ember.

For one thing, I haven't been to a single React site that isn't an absolute CPU hog. Facebook is the worst for this.

Besides that though, I feel like it's still some intermediate step before we have something better.

I'm bullish on Elm though. For now, plain vanilla (but mostly functional) JS works fine for me and occasionally I'll throw in Backbone/Marionette where appropriate. Maybe that's too boring for people, but I'm too busy being happy with a stable stack and making money to care.

Re: Am I wrong in hating React JS?

#8
What may help is to change your perspective, and to change your word choice.

It's not hate. It's definitely not hate. You don't like React, and that's perfectly fine. "Hate" has some very specific, very negative connotations that make almost impossible to have a regular conversation. One of my mentors uses the term "stop words". Hate is on that list of words that, when used, stop the conversation in its tracks.

It's ok to not like things. It's perfectly OK to not like Javascript frameworks. There's a ton of them, or you can write your own if you feel that's necessary.

But please, can we stop throwing around the word "hate"? It does nobody any good and only furthers the problems of ego and exclusivity prevalent in our industry.

Re: Am I wrong in hating React JS?

#9
I wasn't a huge fan of JSX until I saw the template errors in Angular 2. Not trying to bash on the rest of Angular 2, but it really made me appreciate how JSX points out the exact syntax error at compile time. Pretty much all template based frameworks have the same problem.

It took a while for React to "click" for me, but that was mostly because of transitioning from MVC to Redux. I highly recommend learning pure React first. Build a project with that first, even if it seems like you're writing a lot of code.

Re: Am I wrong in hating React JS?

#10
The reasons why you should like react

- forces you into an object oriented paradigm with constructors/destructors

- mutation from external sources and internal sources results in a single function being run to refresh the output.

- inline html/xml is your freind. You can see easily how a ui is structured rather than parsing a 300 line file to see what gets created, destroyed, appended, prepended anD etc

- all jsx results in is a "patch". This "patch" is then compiled into components (which also result in a "patch") or html elements/text/null values. This makes reasoning about the application simpler since a "controller" component may not care about updating canvas info. But the "canvas" component certainly does

Post reply on HN