Learning React.js: A step by step course

React has become very popular among developers within the past few years. Many Javascript developers have switched from other libraries to React and sometimes switching from a different library may be difficult to understand the basics of React.

Summary

Part 1: Setting up React

React has grown a lot since it’s release and the way I get started with a new React project has changed too. This was the part I hated the most with React, I didn’t know much about webpack, browserify, … therefore it was difficult for me to get the right settings.
Dan Abramov (a React beast), created a node module, create-react-appon GitHub, that helps you do all the dirty stuff (webpack config, install core dependencies, …). It’s amazing and I strongly advise you to use it.

The documentation of this utility is very well written. I won’t rewrite it again and let those who want further informations go check out the official docs.

Here are the commands you need to run to get your app up and running ! (Assuming you have Node installed)

If you have already run create-react-app you will see that in the generated files, there is an src folder. This is the folder where you will be working with all your JS files. You have some default code in there that we will look into deeper in the next sections.