Live data from Hacker News

My struggle to learn React

bradfrost.com

51–60 of 218 posts

Re: My struggle to learn React

#51
post #32

Earlier quoted context omitted.

In the pursuit of React, something is added everyday. In the pursuit of enlightenment, something need to be dropped everyday. [1] In the react realm, every problem is solved by throwing another layer of complexity/abstraction/whatever you call it [1] Adapted from https://www.goodreads.com/quotes/175803-in-the-pursuit-of-kn...

Like Java/Spring. Why do not use a more simple approach, say jQuery?

Why ride across the US in a car when you could ride a bike?

Re: My struggle to learn React

#52
post #19

Earlier quoted context omitted.

So don't use Redux, React Router, and Thunks. I don't even know what React JSS is. Use create-react-app's tooling. Even Redux's author tells people Redux is overused. A pretty big percentage of the value of the flux pattern is just in having an event pubsub system, so if your application is so complicated that you really feel like you need to structure it, you can just use EventEmitter. I frankly don't understand the…

I mean this in a nice way, I'd really appreciate a gist showing how you get the core concept of react-router in 50 lines. It's in a project of mine now and maybe it shouldn't be.

Well, it really boils down to

  const path = findThePath();

  class Router extends Component {
    render() {
      if (path === "/about") return 
      else if (path.match(someRegex)) {
        const data = parseSomePath(path);

        return 
      } else {
        return 
      }
    }
  }
Seems as though React Router has gotten a bit complex because it's abstracted away from the concept of a webpage, such that one can use it in the browser, or React Native (which can be a number of environments).

Of course, I say just buck-up and learn the damn thing, it isn't that complex... earn the "Engineer" in your job title!

Maybe I'm just an out-of-touch neckbeard these days?

Re: My struggle to learn React

#53
post #37

Earlier quoted context omitted.

Not sure what you're trying to say here. Sounds like you don't need React, and that's perfectly fine. I've had applications like that as well. React becomes useful when you have really complex and dynamic websites, not when you're building basic CRUD todo applications.

>React becomes useful when you have really complex and dynamic websites, not when you're building basic CRUD todo applications I realize you're just trying to be dismissive, but in point of fact, my CRUD applications are far more complex than basic todo applications.

You can do a fairly complex system by yourself with a simpler scheme because you have a mental model of how things are organized. It's when you throw more developers into the mix that you run into issues.

Re: My struggle to learn React

#54

Honestly I don't know how I learned React. It's not fun at all. Oh sure, the basics of React is not too hard. If you ignore all the outdated examples and code (using var, no JSX, overusing component lifecycle, not using functional components). But then learning Redux, React Router, React JSS, Reselect, Redux Thunk, Webpack, etc., is just terrible. Sure, there are tutorials for each individual library, or maybe even t…

I found react to be extremely intuitive and easy to learn. Redux and react-redux are horribly non-intuitive. So much boilerplate and meaningless terminology and stringly-typed objects. I avoid it.

Re: My struggle to learn React

#55
post #37

Earlier quoted context omitted.

Not sure what you're trying to say here. Sounds like you don't need React, and that's perfectly fine. I've had applications like that as well. React becomes useful when you have really complex and dynamic websites, not when you're building basic CRUD todo applications.

>React becomes useful when you have really complex and dynamic websites, not when you're building basic CRUD todo applications I realize you're just trying to be dismissive, but in point of fact, my CRUD applications are far more complex than basic todo applications.

Then don't use react if you don't need/want to. However, it certainly makes many things easier for development for complex applications especially on greenfield projects.

Re: My struggle to learn React

#56
I've been writing Java for 20 years and never for a moment had the least doubt about the value of 'this'. ES6 has been slowly morphing into Java yet it hasn't solved this basic issue very well.

Re: My struggle to learn React

#57
At this point, the JS ecosystem with React is a bit too complicated for a hobbyist to learn quickly. I have friends spending months with just React, not including other libraries.

But React is a tool for building complicated UI's, and overwhelmingly complicated UI's are requirements for startups, corporations and organizations, not personal sites or small toys. So like many other technologies, this one is perhaps best learned on the job, and it doesn't need to be optimized for the hobbyist.

That being said, losing the hobbyist comes with serious costs to community and innovation, a fine balance needs to be found.

Re: My struggle to learn React

#58
I've been doing web development for over 15 years, and I've seen a lot of trendy web application / UI frameworks that are going to be the The Final Paradigm come and go.

That experience has taught me an important lesson about trendy framework stuff: If it doesn't make sense to a lot of people after a lot of thought, and there's a lot of rationalization required to plug that gap, it's probably not working out very well.

As of now, I have still yet to see a JS framework that made any sense to me. They're all really weird to me and solving problems I've never had with UI development, or regressing previous best practices in ways I don't think make any sense.

I'd much rather just use template rendering than this stuff most of the time. At least with that, you're just using Real JavaScript (TM) and you don't have to learn some new special HTML attribute based language.

Re: My struggle to learn React

#59

I think this is the reason so many are picking up Vue rather than React or Angular these days. Vue offers the component approach and is generally fun to learn IMHO.

I can relate to Brad Frost's issues picking up React. Vue, on the other hand, took me a day to wrap myself around and pick up with some certainty.

Re: My struggle to learn React

#60
post #35

Earlier quoted context omitted.

>>* The tooling was a disaster before create-react-app. But now there's create-react-app, so the tooling isn't a problem. But what happens when you inevitably need to step outside the boundaries set by create-react-app? From that perspective, it simply delays the problem, rather than solving it.

I don't know, because haven't needed to step outside those boundaries. I'm sure it will be painful when that happens, but by that point, I'll have gotten so much done that I probably won't care too much. I had a gulp build process I used before create-react-app; it was gross to get working, but then worked just fine. I could live without create-react-app, but why would I?

I've never used create-react-app and I still love React.
Post reply on HN