Getting Started With React.js – 4 Things I Wish I Knew Before I Started

If companies like Facebook, Instagram and Netflix are to be believed, the best way to build big, fast, scalable web apps in JavaScript is with React. (Facebook uses it for production, and Instagram is written in it).

React is about creating complex apps from reusable pieces by using the building blocks of components and updating only the parts that need to be updated when your application data changes. It’s all about the view. But where on earth to start?

Is React a library or a framework?

What’s the first thing I wish I’d known about React before I got started? I wish I’d known whether to call it a framework or a library. There are a lot of conflicting opinions about this on the internet. A lot. Like loads. The argument seems to have been running for so long it’s almost a meme.

So for speed, I went straight to the horse’s mouth for the answer:

“React is NOT an MVC framework”, says Pete Hunt at the React blog.

“React is a library for building composable user interfaces. It encourages the creation of reusable UI components which present data that changes over time”.

So there you have it. It’s a library.

No train, no gain

Second step on the road to React, find a good course. Like all new development tools and environments, it’s tempting to just dive straight in and teach yourself. But you can speed things up and avoid a whole world of head scratching by opting for an simple online introduction to get you up and running faster.

Start at the very beginning of course, with the super helpful tutorials on Reactjs.org

React is still relatively new and changes quickly. So whatever course you choose, make sure it’s bang up to date like this Ken Wheeler introduction on scotch.io which has been updated for React 16.

For paid courses (and good to show the boss for the group discounts), try React for Beginners by Wes Bos https://reactforbeginners.com/ , which uses real world examples of variable content apps and promises to have you up and building in no time. 

Keep up to speed so easily with Podcasts

Speaking of keeping up to date, with so much to keep on top of in the ever changing world of development, how much time do we spend actively getting up to date on everything we work with?

So often we just don’t have enough hours in the day to proactively go and look for the latest news or read every single update. More often than not we’ll find a problem to solve or an issue will come up mid-project which leads us to look for relevant updates and everything else gets added to the growing ‘to read’ list.

The solution? Podcasts. I wish I’d thought of this one sooner. Now I can keep up to speed and be entertained on my commute or at the gym by simply tuning something like the React Podcast on changelog.com. How easy is that!

Hot Java

Make sure your JavaScript is up to speed. React is a Javascript library so if you’re not 100% confident in your JavaScript skills make your life easier by doing some homework first. As with all programming languages, there’s never any harm in making sure you’re up to date from time to time.

Try the excellent MDN Webdocs site for their Reintroduction to JavaScript tutorial (and so much more). Great Javascript skills will help you to be a great React developer.

PS. It’s not compulsory to use JSX in Redact, but it makes for much simpler code. So read up on that in advance and you won’t be too surprised when you see it.