2 ms·
HMR is a feature of bundlers but your frontend code has to specifically interface with it if you want JS changes to live-apply to a running page without losing
by AgentME 3y ago
HMR is a feature of bundlers but your frontend code has to specifically interface with it if you want JS changes to live-apply to a running page without losing state instead of refreshing the page. With React, you have to use react-refresh in order to have HMR support. Frameworks like NextJS configure react-refresh and the bundler's HMR features together for you.