Preparing the development environment

Before we start coding, we'll need to get our development tools installed and configured. This involves installing some Node modules and writing the Webpack configuration file. We've already installed Node. Now, we just need to install the Webpack configuration file.

Installing and configuring Webpack

Install Webpack and the Webpack dev server. Here the Webpack dev server is installed globally so that the command is easily available from any command path.

npm install --save webpack
npm install -g webpack-dev-server

Within our Webpack configuration we are going to use the following: the Babel JS transpiler for ES6 and JSX, the React hot-loader so we'll have to refresh our browser less often, and the Webpack dev ...

Get React: Building Modern Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.