gaearon / react-hot-loader

Tweak React components in real time. (Deprecated: use Fast Refresh instead.)

Home Page:http://gaearon.github.io/react-hot-loader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hot reloading tested in different ways and is not working properly

Ridermansb opened this issue · comments

  • Operating System: macOS Big Sur 11.2

  • Node Version: v14.15.4

  • NPM Version: 6.14.10

  • webpack Version: ^5.19.0

  • webpack-dev-server Version: ^4.0.0-beta.0

  • Browser: Google Chrome Version 88

  • This is a bug

  • This is a modification request

Code

Repository link: https://github.com/Ridermansb/webpack5Hot

Expected Behavior

In all case... should not reload the page and only reload the portion that's changed

Actual Behavior

It's Always reloading the entire page.

For Bugs; How can we reproduce the behavior?

Just clone the repository ridermansb/webpack5Hot

  • npm install
  • npm start

And try update Header component

1 - this package is no longer in development. No changes will be made.
2 - hot-loader and react-refresh cannot exist simultaneously. Consider using only the second one.
3 - "full page refresh" is out of hot/refresh responsibility and bound only to webpack's HMR mechanics - some update slipped through "hot.module.accept", reached the topmost entry and signal to webpack to reload the page.

👉 please double check console output. It should display a reason for a page reload.