React Hot Loader is a plugin that allows React components to be live reloaded without the loss of state. It works with Webpack and other bundlers that support both Hot Module Replacement (HMR) and Babel plugins. HMR allows us to replace modules in-place without restarting the server. Here’s how you can enable it for different bundlers. The easiest and fastest option to use React Hot Loader with Webpack is to use webpack-dev-server with --hot CLI option. If you’re only rendering on the client side but you have to use some custom node server, this is still an easy option. You can simply copy server.js from the official boilerplate into your project. The important part of the configuration is that when you create a new WebpackDevServer, you need to specify hot: true as an option.

Features

  • To update components when changes occur, you need to add some code to your main client entry point file
  • As of version 4, React Hot Loader requires you to pass your code through Babel to transform it so that it can be hot-reloaded
  • It's possible to chain Webpack loaders so that your code passes through Babel and then TypeScript
  • Parcel supports Hot Module Reloading out of the box
  • Hot reloading code is just one line in the beginning and one line at the end of each module so you might not need source maps at all
  • To make your linked package to be hot reloaded, it will need to use the patched version of react and react-dom
  • Webpack plugin will also land a "hot" patch to react-dom, making React-Hot-Loader more compliant to the principles

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow React Hot Loader

React Hot Loader Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of React Hot Loader!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript Text Editors, JavaScript Browser Extensions and Plugins

Registered

2021-05-13