hot module replacement means code changes appear instantly in the browser without the need to rebuild the entire app.
Intro
“Hot Module Replacement” (HMR) is a feature to inject updated modules into the active runtime.
It’s like LiveReload for every module.
HMR is “opt-in”, so you need to put some code at chosen points of your application. The dependencies are handled by the module system. HMR is popularly used by webpack.
Questions
- Usage of HMR and code implementation.
- Trouble in implementing the concept in your code.
- Trouble using it with webpack or other bundlers.
- Unexpected behavior while using HMR.
- Basically, any HMR related questions!
Useful links
webpack docs: https://webpack.github.io/docs/hot-module-replacement.html
HMR detailed explanation: https://github.com/webpack/docs/wiki/hot-module-replacement-with-webpack