Description
Dan Abramov mentioned that Devtools v4 will be making react-hot-loader
obsolete: https://twitter.com/dan_abramov/status/1144715740983046144?s=20
Me:
I have this hook:
require("react-reconciler")(hostConfig).injectIntoDevTools(opts);
But HMR has always worked completely without it. Is this now a new requirement?
Dan:
Yes, that's what the new mechanism uses. The new mechanism doesn't need "react-hot-loader" so by the time you update, you'd want to remove that package. (It's pretty invasive)
I can't see any mention of HMR in the Devtools documentation, however; now that react-hot-loader
has become obsolete (and with it, the require("react-hot-loader/root").hot
method), how should we set up apps for HMR in:
- React DOM apps
- React Native apps
- React custom renderer apps
I'd be particularly interested in a migration guide specifically for anyone who's already set up HMR via react-hot-loader
.
Also, for HMR, does it matter whether we're using the standalone Devtools or the browser-extension Devtools?