Hot Loader

Hot Loader is a plugin for webpack that allows instantaneous live refresh without losing state while editing react components

@hot-loader/react-dom replaces the "react-dom" package of the same version, but with additional patches to support hot reloading.

Webpack Hot-Module-Replacement HMR

For react

HMR use root component

Uses

Mark your root component as hot-exported:

Make sure react-hot-loader is required before react and react-dom

OR . import 'react-hot-loader' in your main file

OR . prepend your webpack entry point with react-hot-loader/patch, for example:

@hot-loader/react-dom

Last updated

Was this helpful?