Live data from Hacker News

My struggle to learn React

bradfrost.com

31–40 of 218 posts

Re: My struggle to learn React

#31
post #12

This is a fine article. But I just want to say, as an alternate data point, my experience has been exactly the opposite . I love React. React is the first front-end technology I have ever managed to get to stick. * ES6 is just a detail, I know. But for me, ES6 transforms Javascript from an idiosyncratic scripting language where I constantly have to look up the ordinary way to handle basic programming tasks into somet…

>>* 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.

Re: My struggle to learn React

#32

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…

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...

Re: My struggle to learn React

#34
post #3

I'm surprised the tooling isn't mentioned more... create-react-app is awesome and huge time saver but as soon as you have to step outside of that realm there are so many dependencies and other tools to get the sausage made that it's daunting for new-comers. It's not at all fair to compare JS and Go BUT that is the one part of Go I really, really love- `go fmt` is built in and most of the tooling Just Works™ with mini…

The equivalence of go fmt in React/JS would be prettier. It parses JS/JSX into AST and outputs them out using pre-defined formatting.

And prettier is much much better than Go fmt because it breaks lines for you

Re: My struggle to learn React

#35
post #12

This is a fine article. But I just want to say, as an alternate data point, my experience has been exactly the opposite . I love React. React is the first front-end technology I have ever managed to get to stick. * ES6 is just a detail, I know. But for me, ES6 transforms Javascript from an idiosyncratic scripting language where I constantly have to look up the ordinary way to handle basic programming tasks into somet…

>>* 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?

Re: My struggle to learn React

#36

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 recommend the e-book Fullstack React (https://www.fullstackreact.com/) (I have no relationship to these guys, other than being a customer).

I have had junior engineers read it in the past to get up-to-speed and it does a great job of teaching all of those technologies together in a way that makes sense and is easy to understand.

Re: My struggle to learn React

#37

I don't get what the benefit of using React is, aside from having it on my resume. A virtual DOM? What does that get me? It renders faster? Rendering speed is not a problem my CRUD screens have. Etc., etc. Perhaps some UIs are so complex and dynamic that they're easier to build and maintain using React. I'm not saying other people shouldn't use React, but I'm fairly certain it wouldn't give me enough payback to justi…

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.

Re: My struggle to learn React

#38
post #19

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…

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.

Re: My struggle to learn React

#39
re: #5: At my previous job we wrote our own UI toolkit with React and css-modules. We had many dev-only views that we used to inspect and test our components. It worked great because it let you visualize all the states a component could have for a wide range of inputs, so you knew they were all being handled well. For example: If you get a long input prop do any of your styles break from visibility overflowing? If a nullable value is missing, are you styling it appropriately while showing a placeholder? Unfortunately it wasn't open source, but it's being done.

Re: My struggle to learn React

#40
I guess this is part of the whole divergence of the JS community.

This is one of the questions I ask at every interview I do now when looking for a new gig:

"Do you prefer one JS framework does it all like AngularJS, or do you like to mix and match your JS libraries like taking ReactJS and combining it with say AmpersandJS, BackboneJS, etc?"

This is where we are. One group wants to use ReactJS and add complexity as they need it. Others just want a complete framework (however complex, and let's be honest, Angular is pretty complex!) out of the box. I've always been happy with full stack frameworks out of the box for several reasons, but it's what I prefer.

I'd be interested to know where all of this ends up in the next 18 months though.

Post reply on HN