Skip to content

Commit bbc5626

Browse files
authored
Merge pull request #526 from bonham000/patch-8
Update hot-module-replacement.md
2 parents 53b34af + 43e5917 commit bbc5626

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/concepts/hot-module-replacement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The compiler addtionally makes sure that module and chunk ids are consistent bet
3030

3131
### From The Module View
3232

33-
HMR is an opt-in feature, so it only affects modules that contains HMR code. The documentation describes the API that is available in modules. In general the module developer writes handlers that are called when a dependency of this module is updated. The developer can also write a handler that is called when this module is updated.
33+
HMR is an opt-in feature that affects only modules containing HMR code. You can consider patching styling through style-loader as a good example. To make this work, style-loader implements the HMR interface. Implementing it you describe what should happen when a module is updated. In this case we simply replace the styling with the one received through HMR.
3434

3535
In most cases it's not mandatory to write HMR code in every module. If a module has no HMR handlers the update bubbles up. This means a single handler can handle an update to a complete module tree. If a single module in this tree is updated, the complete module tree is reloaded (only reloaded not transferred).
3636

0 commit comments

Comments
 (0)