Skip to content

Guide · Open source

How to use react-redux-universal-hot-example: setup and tutorial

Updated · written with AI from the project's own documentation and checked against our catalogue data

react-redux-universal-hot-example is an open-source starter boilerplate for a universal web app that combines Express, React, Redux and Webpack. This guide explains what the project contains, how to install it with npm, and how its server and client code fit together. Read it first because the README warns that the project is badly out of date and should not be used to start new work.

react-redux-universal-hot-exampleerikras/react-redux-universal-hot-example · ★ 12.1k · MIT

Quick start

  1. 1Check prerequisites. Make sure Node.js and npm are installed on your machine before you start.
  2. 2Get the code. Clone the erikras/react-redux-universal-hot-example repository from GitHub.
  3. 3Install dependencies. Run npm install in the project folder.
  4. 4Start the dev server. Run npm run dev and wait about 30 seconds for the first webpack build to finish.
  5. 5Build for production. Run npm run build to create the production build.
  6. 6Start the production server. Run npm run start to launch the production server.

Is react-redux-universal-hot-example still safe to use?

The README begins with the warning "DO NOT USE THIS!!" and describes the repo as a historical artifact of React development in 2015. The author says it is far out of date.

This makes it a good study project rather than a foundation for a new app. For new work, current tools such as Vite, Next.js, Create React App or Remix are better fits, according to the comparison list for this project.

  • Good for: students studying a 2015-era React and Redux structure
  • Good for: readers interested in the history of server-rendered JavaScript apps
  • Not good for: new projects, teams needing security updates, or beginners wanting a modern starting point

What do you need before installing?

The install method is clone-and-build. The prerequisites listed for this project are Node.js and npm.

  • Node.js
  • npm

Install dependencies and run the development server

After getting the project code, install its dependencies with npm, then start the dev server. The README notes that the first run can take a while, with several webpack-isomorphic-tools messages, and suggests waiting around 30 seconds.

Redux DevTools are enabled by default in development. To turn them off during development, set __DEVTOOLS__ to false in /webpack/dev.config.js. They are not enabled in production.

  • Dock toggle: CTRL+H
  • Move dock position: CTRL+Q
  • The Redux DevTools Chrome extension is used on the client side if installed
npm install npm run dev

Build and run the production server

To produce a production build and start the production server, run the two commands below in order. The README lists these as the build and start steps.

npm run build npm run start

How the server and client work together

bin/server.js enables ES6 and ES7 syntax on the server and then starts server.js. server.js proxies requests to /api/* to an API server at localhost:3030, serves favicon and static files from /static, and delegates rendering to react-router. It listens on port 3000.

The server creates an ApiClient, which both server and client use to talk to the API. On the server it passes the session cookie along. The server then fetches data, renders the page, and writes the Redux state to window.__data. The client entry point client.js loads the routes, rehydrates that state and renders over the server-rendered DOM.

Server-side data fetching uses the redux-async-connect package, which provides a ReduxAsyncConnect container that wraps the render tree on both server and client.

  • bin/server.js: enables ES6 and ES7 syntax, then starts server.js
  • server.js: proxies /api/*, serves /static, renders with react-router
  • client.js: loads routes, rehydrates Redux state, renders over server DOM

What libraries does the project include?

The README lists the main libraries. These include React, React Router, Express, Babel, Webpack, Redux, Redux DevTools, ESLint, redux-form, react-helmet, webpack-isomorphic-tools and mocha for unit tests.

The author describes the stack as bleeding edge at the time of writing in June 2015. Treat the version of every library as historical rather than current.

  • React and React Router for pages and routing
  • Redux with React Router Redux bindings for state
  • Express and Webpack for the server and bundling
  • ESLint for code style, mocha for unit tests

Where to read the code and docs next

The repository includes documentation guides, including Exploring the Demo App, Installing the Kit, Adding Text to the Home Page and Adding A Page. A demo is listed as running on Heroku from the heroku branch.

  • docs/ExploringTheDemoApp/ExploringTheDemoApp.md
  • docs/InstallingTheKit/InstallingTheKit.md
  • docs/AddingToHomePage/AddingToHomePage.md
  • docs/AddingAPage/AddingAPage.md

What people use it for

  • Reading how a 2015-era React and Redux app was organised on server and client
  • Comparing old patterns such as server-side data fetching with redux-async-connect against current approaches
  • Studying how Webpack Hot Middleware and webpack-isomorphic-tools were wired together
  • Learning how redux-form and multireducer manage form and key-based state

Frequently asked questions

Is react-redux-universal-hot-example free to use?

The project is released under the MIT licence. The README does not discuss pricing beyond this, and the author describes the project as out of date.

What do I need to run react-redux-universal-hot-example?

The prerequisites are Node.js and npm. You clone the repository, run npm install, then start the dev server with npm run dev.

Should I use react-redux-universal-hot-example for a new project?

No. The README says DO NOT USE THIS and describes the libraries as years out of date. Current tools such as Next.js, Vite, Create React App or Remix are better choices for new work.

Why does the dev server print webpack-isomorphic-tools messages?

The first build generates webpack-assets.json, and the README says it may print several waiting messages. It suggests giving it about 30 seconds before assuming something is wrong.

How do I turn off Redux DevTools?

In development, set __DEVTOOLS__ to false in /webpack/dev.config.js. The README also notes DevTools are not enabled during production.

What is the alternative to react-redux-universal-hot-example?

The comparable projects listed are Next.js, Vite, Create React App and Remix. These are more current options for building React apps, including server-rendered ones.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use react-redux-universal-hot-example to study how a 2015-era universal React and Redux app was structured, or to compare old patterns with current ones. Do not use it to start a new project, and choose Next.js, Vite, Create React App or Remix instead if you need current framework support or security updates.

Install options & downloads