Best Books to Learn React and Javascript

Its rare that I read a computer programming book from cover to cover, but this is one of them. It takes a potentially difficult to learn subject – React – and spells it out using a “less is more” approach – nothing but the bare essentials. I tried to learn React when I worked at my last company – but due to time constraints hired a contractor to help me complete a big project. This year – I (finally) understand React, and this book really helped me stay away from the reason why I had a hard time learning it last year – information overload. React is a really fun technology to learn – its “weird but wonderful”. JSX might be the reason why React is so bizarre – but this book clearly explains how and why it fits like a glove, and how to separate how, when, where and why Javascript, HTML, CSS and JSX are used. He also just covers the topics that are essential to React – which is clearly an object oriented front end technology – and he introduces “just enough” of Router and Redux – two libraries that too many other authors get opinionated fast on their use. Since I am using Formik as a state and UI container – what I needed was mostly React – and I needed to understand if and when Router and Redux would be needed. I’m quite sure the answer is that Redux is not at all needed but Router might be (when I want to switch between the Main app page and an Admin page). The author even includes  link where Dan Abrams of React fame discusses when you DO NOT want to use Redux – and that sealed the deal on (again – this year as I did last year) avoid Redux.

Speaking of “weird but wonderful” – Javascript is a weird but wonderful programming language – especially when you use it with React.js and Node.js. There are many pitfalls to Javascript (e.g – using “==” vs. “===” – YIKES! and using “=>”, etc. I have found other decent books on Javascript – but this one is actually much more readable – and actually way more interesting than any other “computer language” book that I have ever read. I honestly couldn’t put it down while reading it on my way home from work yesterday. I got out of the BART train in Orinda and stood on the platform finishing the first chapter. Usually I’m ready for a nap at that point . . .

Here is a tip – React is highly Object Oriented – and uses an “interesting” way to communicate state and event handling from parent to child objects in an object graph. Redux disrupts this React pattern – its probably useful for a much larger app than what I am building, and where there are more than one or two developers writing the app. Javascript is used partly as a Functional language with React, but sometimes its procedural, and sometimes its object oriented. SO – keep an open mind and don’t let this “context switching” confuse you. I think along with these books – take a bunch of Google Material-UI (a “design system made up of many UI component libraries), and put together an app that keeps each component or set of components in a separate file (separation of concerns). I have 5 files – one for the app, one for the form container and three for the three sections of my form app – with two of these files having just a table component and one having several data entry fields in it – but contained in a “card”. A year ago I thought Material-UI was boring, but compared with Ant-UI, which I liked at the time – and Evergreen-UI – which we ultimately used, I think this year, Material-UI is quite awesome. My app this year at LendUp looks, feels and behaves much better than what I built at my last company. I have really stepped it up and moved to the next level. Using Java and Spring-Boot and JPA for my REST API is also a big step up – but I digress. Its all good – and all of these pieces fit together well. Looking back – it is a lot to try to learn all at once. It seems that actually taking a lot of time to just think and muse about all of these jigsaw puzzles helped too. OK – back to the book review . . .

Both of these books make me realize that most computer book authors regurgitate information that you can find online – and many are written by opinionated “macho nerds”. What I mean by this is that there is this weird evolution in the IT field where its macho to spew how brilliant you are with techno babble and high falutin’ comp sci topics. For me – real intelligence (vs. Artificial Intelligence) is “owned” by authors like these – who are unpretentious and who very clearly, practically and pragmatically lead you to a higher place in your journey to learn something new. They care about teaching, not beating their chest and showing off. These two books do not waste your time – and they clear things up – because there is a lot of junk on line for free. Half the battle is knowing when you are learning the right approach – or not – and of course when you start out, you generally have an open mind that can be easily polluted or corrupted. Ask the man that had a confused look on his face a year ago – my head was spinning with all these pieces – and on top of that – I had three people at work tell me the “right way” to approach the problem, and they all differed and disagreed with each other. YIKES!

This is my “Summer of React / Javascript” – and there is no obfuscation, no tricks, no Macho-Nerd bullshit. Just the facts, Ma’am / Ma’an. Knowledge is Power and I am feeling a whole lot more empowered this summer.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: