You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's strange that my component can't trigger HMR normally in React.PureComponent, but it's normal in React.Component.
HMR works fine if I replace React.PureComponent in Routes with React.Component.
Has anyone encountered such a problem?
React-Hot-Loader has a special logic to trigger force re-render in PureComponents and cause update of affected components... which was never tested for React 17. So something might got broken here and there.
Unfortunately, the fix is not coming, at least from my side - #1848
Description
It's strange that my component can't trigger HMR normally in React.PureComponent, but it's normal in React.Component.
HMR works fine if I replace React.PureComponent in Routes with React.Component.
Has anyone encountered such a problem?
Expected behavior
React.PureComponent can be use HMR
Actual behavior
Environment
"react-hot-loader": "^4.13.1",
"react": "^17.0.2",
"webpack": "^4.44.2",
"webpack-dev-server": "^3.11.2",
node: v14.19.1
chrome:108.0.5359.124
The text was updated successfully, but these errors were encountered: