Getting Started with React and Webpack


__EDIT__: I missed Create React App from Facebook .. Strongly recommend that instead of the following :-)

While using React and Webpack at work has taught me a lot, what it hasn’t taught me, is how to start a new project with it. Here is my contribution to the web about how to start a new project with React.

Assumption is you have Node and NPM installed, if not install it here.

Install the following dependencies:

Yo: npm install yo -gReact Webpack Generator: npm install -g generator-react-webpack

Navigate to a new directory and run: yo react-webpack. It will ask you some questions:

Please choose your application name: NewReactAppWhich style language do you want to use? SCSS note: this is a personal preference, choose what you’re comfortable with.Enable postcss? n

Run npm start and once it’s finished loading you should be able to hit http://localhost:8000. The generator we used has Hot Reload installed which means if you edit files from within your project, the development server will...