Open jaspal-dev opened 6 months ago
Hi, I cannot help unless there's a reproduction of what's happening. Depending on how your modules and code is structured it may or may not fallback to a full reload to ensure consistency.
Hi
https://github.com/jaspal-dev/weather-app/blob/fix/react-refresh-issue/src/App.jsx Please review this file. In this branch, you can also view the webpack and plugin configuration.
If I change a counter to counter1 or anything else in the file, the changes are reflected in the web app, which is expected.
But if I uncomment the code undefined.a
as given in the file for throwing some error, after that, I uncomment it. The page reloads, and the state of the counter is lost.
After fixing any error, the state should be mentioned.
I am using the module version 0.5.13. In case if app found an error (eg. accessing undefined.a ), it looses it state and performs full reload. Is this behaviour is default then how to tackle this one, just like CRA handle it.