July 2018
Intermediate to advanced
164 pages
3h 15m
English
In this section, we will create a simple React-based project and will learn how this library works and what its core concepts are.
Let's create an empty project folder and initialize NPM:
$ mkdir learn-react$ cd learn-react$ npm init$ npm install react react-dom --save
The quickest way to get started with React is to use the react-scripts package:
$ npm install react-scripts --save-dev
Now, let's add a start script to package.json:
{ "scripts": { "start": "react-scripts start" }}
NPM auto-binds CLI scripts installed in the node_modules/.bin directory along with the packages, so we can use them in package.json scripts directly.
The smallest possible setup for a React app is the following: we need a landing HTML page ...
Read now
Unlock full access