Vite’s Hot Module Replacement: Native ESM Keeps Your App State Intact
Vite’s Hot Module Replacement uses native ES modules to update only changed parts of an app, preserving state with React Fast Refresh. See a concrete example, how to use <code>import.meta.hot</code>, and common pitfalls.