Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Best (physical) book to learn React?
14 points by zapstar on Jan 21, 2022 | hide | past | favorite | 23 comments
I’d love to read through a book on React, but I’m surprised at the poor reviews on Amazon. Perhaps I’m looking in the wrong place. Who can point me to a good one (that maybe isn’t sold from Amazon)?

Alternatively, why should I not be considering React? Is everybody using something else these days? Looking to build a front-end to interact with some REST APIs.




Alternatively, why should I not be considering React? Is everybody using something else these days? Looking to build a front-end to interact with some REST APIs.

React is a decent choice for that. Go ahead and learn it.

If you want to do frontend in 99% of shops - React by itself is not enough. People will tell you it's "just a library" - and that's technically true.

But in the wild you'll be dealing with something I call "Enterprise React". A bloated monstrosity of a web project created with create-react-app (Which is a nightmare of needless complexity under a thin and very slow veneer of convenience). Your react and general coding skills will be secondary to your skills as a sort of npm sysadmin, because best practices are to download a library for every whim anyone ever has.

That is unless you never update it your packages while you are there. Which honestly - I've recently learned - is the smarter career play.

So sure, learn react, make your SPA. But be careful of getting too deep into it, because that way lies madness.


> Enterprise React

This is my experience exactly with React. I hate it. I advocate for html over the wire (LiveView, Hotwire, htmx, etc) or even just plain html templates (they are not evil!) to whoever will listen. I realize SPA frameworks have a place, but those places occur much less frequently than people suppose (or want).

I'm saving your comment to show people next time I encounter another team mindlessly reaching for React and friends.


> create-react-app (Which is a nightmare of needless complexity under a thin and very slow veneer of convenience).

No it’s not. create-react-app barely does anything except bootstrapping a project with sane defaults. It could improve on devDependencies but they don’t depend on a lot more that what you’d need to setup yourself anyway.


Also as a beginner, React is insanely confusing...


Maybe you are looking for "React: Up & Running: Building Web Applications" 2nd Edition? Physical book published by O'reilly on December 2021. Author is Stoyan Stefanov, a facebook engineer (ex fb I think?). Has good reviews. It's also only 230 pages. https://www.amazon.com/React-Running-Building-Web-Applicatio...

Hooks (functions?) are the way forward for React. Classes were the old way. But this book has both. Author's rationale is "A controversial decision was the inclusion of class components in addition to function components. Function components are likely the way forward; however, the reader is likely to encounter existing code and tutorials that talk only about class components. Knowing both syntaxes doubles the chances of reading and understanding code in the wild". Seems reasonable.

Also definitely take a look at the React Docs Beta at https://beta.reactjs.org/

They seem to be a substantial improvement over the previous docs. All explanations are written using Hooks rather than classes.

I love this 10 min intro video to React Docs Beta by Rachel Nabors from React Conf 2021. Has subtitles. > https://www.youtube.com/watch?v=mneDaMYOKP8

Some comments have said React might be a way to hell, so if you wanna improve your JavaScript or CSS, there are 2 well-regarded paid courses:

Just JavaScript by Dan Abramov. He's a member of the React team, and a co-author of Redux and Create React App. https://justjavascript.com/

CSS course by Josh Comeau. https://css-for-js.dev/

Both are paid courses.


What would be relatively affordable high quality content for css


Road to React, is a decent book (and the only one I read), but honestly I would recommend watching a few tutorials instead.

If you worried about outdatedness just try to get a book made after the introduction of React Hooks which should be end of 2018/early 2019. I think the physical Road to React on Amazon isn't updated, don't buy that lol, best to buy the ebook file from that dudes website and read it off of a kindle or something.


Any favorite video tutorials?


https://egghead.io/lessons/react-a-beginners-guide-to-react-...

Made by Kent, some dude that wrote a popular testing library for React. Pretty good tutorials. I'm quite positive that it's up to date.


ReactJS is certainly worth learning. I personally use the Clone Wars on GitHub as my instruction manual when I'm not sure how to accomplish something with React and I want to see how it could be built in the real world.


Physical is probably not that good for learning a framework


I work all day at a computer. I enjoy spending time away from the screen — I find it easier to absorb new information and harder to be distracted.


So you're reading about the framework without writing any code? I would follow along, write and test code samples, run small experiments with new features you come across etc. Leave the reading-time-away-from-screen for fiction and for nontechnical nonfiction.


I like "Learning React" 2nd Edition (2020) by Ranks and Porcello. Emphasis is on functional programming and hooks.


Bonus points: I'd like to be reading about a recent version of React, not a book that was published in 2018.


I understand that you want a paper book, but just to be safe: have you already seen https://beta.reactjs.org/learn? It’s really good.


Sheepishly, I have not. Sounds like a good place to start! Thank you!


Why restrict yourself to physical. There is a big world of online courses on React and many are free.


Do you have any recommendations?


Scrimba has a good free React course.

https://scrimba.com/allcourses?price=free&topic=react


Read the official React documentation and view courses on egghead.

https://egghead.io


freeCodeCamp has a new course: https://www.freecodecamp.org/news/free-react-course-2022/

(All the books I learned from are out of date)


Its actually from Scrimba which doesn't from some reason get as much attention. FCF just reposted the course under their brand as they have a partnerships. Not nitpicking, just think Scrimba is awesome and more people should know about it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: