Live data from Hacker News

My struggle to learn React

bradfrost.com

1–10 of 218 posts

Re: My struggle to learn React

#2
First I love the design of this website. I haven't seen a blog that was so simple and easy to read (hacker news style)... ALSO be this pretty.

Also I'm curious what podcasts you were listening to? Has anyone picked up a new language from listening to a podcast. I can't imagine getting much out of it without the visuals to go with it.

Re: My struggle to learn React

#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 minimal config (e.g. gometalinter). I find myself stuck when figuring out where the next piece of the JS puzzle should go in my local dev at times and how to make some other things production ready. But we're in a much better place now than we have been!

Re: My struggle to learn React

#5
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…

I'm surprised the tooling isn't mentioned more...

To be fair, this reads to me more as a midstream reflection on the learning curve, not supplying any kind of solution for any of them.

Re: My struggle to learn React

#6
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 justify the investment it requires.

Re: My struggle to learn React

#8
He didn't even get to the part that I find confusing; the naming of things. componentDidMount? componentWillMount? Wtf is mounting? This isn't a goddamn harddrive. Props? Do you mean properties? or arguments? Wtf is a prop? Reconciliation? Portals? The fuck?

And then, to top it all off, you can't just use React, you need to pair it with a set of other libraries, each with their own set of ridiculous jargon and paradigms.

I honestly think a bunch of very talented Facebook devs got bored and decided to make something complex just so they could keep themselves entertained. And then other developers followed suit because it has cool words that make you sound important and inflate your ego, even though it's doing the same shit the web has been doing for 30 years.

Re: My struggle to learn React

#9
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 two or three of the libraries at once. But combining all of them and making sure that it's not a total mess of code is like trying to play QWOP with your code. Now that I have everything compartmentalized and understood, it's pretty easy. But getting there is a long long journey.

I've played around with an idea for a tutorial on modern web development that starts with just basic JS DOM fiddling, then introduces various features and techniques as they're needed. So you'd start with just using old school document selectors. But then, as all the getElementByClassName calls become annoying, maybe you'd introduce transpilation, so that you can querySelector with a map/filter. Then, as the updating starts to get hairy, you could introduce a library like React. As state becomes an issue, Redux. But the point would be to start with the basics and build up an understanding of why we need these libraries. And what problems they solve and what problems they don't solve. But of course, the moment anybody writes this tutorial, half of it will become outdated. Ah well.

Post reply on HN