शब्दकोश · वेब डेवलपमेंट

Hot Reload (Hot Module Replacement)

Hot reload is a development feature that updates changed code in the running browser instantly, often without a full refresh or losing the page state.

अपडेट: अक्टूबर 6, 2026

Hot reload, also called hot module replacement (HMR), is a feature of development servers that pushes code changes to an open browser and swaps only the changed modules, preserving the current page state where possible.

Why it matters

It shortens the feedback loop from edit to result to a fraction of a second. Without it you save, refresh, and re-enter form data or navigate back to the screen you were working on. It is purely a development convenience and should never be enabled in production.

Example

$ npm run dev
  VITE ready in 310 ms
  Local: http://localhost:5173/
[hmr] updated: /src/Button.jsx

The dev server keeps a WebSocket open to the browser and sends each update as soon as you save a file.

Common mistakes

  • Confusing hot reload with live reload, which refreshes the whole page.
  • Deploying a development build that includes HMR code.
  • Trusting the hot-updated state without a full reload before committing.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.