How to do it...

Let's get started with the implementation:

  1. Include the react-hot-loader plugin in our .babelrc file just for the development environment:
  {    "presets": ["env", "react"],    "env": {      "development": {        "plugins": [          "react-hot-loader/babel"        ]      }    }  }
File: .babelrc
  1. Create an Express Server; you need to create a file at src/server/index.js:
  // Dependencies  import express from 'express';  import path from 'path';  import webpackDevMiddleware from 'webpack-dev-middleware';  import webpackHotMiddleware from 'webpack-hot-middleware';  import webpack from 'webpack';  // Webpack Configuration  import webpackConfig from '../../webpack.config.babel';  // Client Render  import clientRender from './render/clientRender';  // Utils  import { isMobile ...

Get React Cookbook 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.