gaearon / react-hot-loader

Tweak React components in real time. (Deprecated: use Fast Refresh instead.)
http://gaearon.github.io/react-hot-loader/
MIT License
12.26k stars 801 forks source link

Hide React-Hot-Loader (behind sugar) #1178

Open theKashey opened 5 years ago

theKashey commented 5 years ago

React-Hot-Loader is a dev-time tool, but it requires some configuration steps. That's not cool.

Idea

  1. Continue development of hot-loader/react-dom and hot-loader/react. Including their versions as a webpack plugins for RHL.
  2. Embed react-hot-loader/root into hot-loader/react-dom
  3. Wrap ReactDOM.render with hot

Now RHL could be injected to the app without any code changes - just rewire react-dom and add webpack/babel plugin.

otakustay commented 5 years ago

Is this feature going to help removing the import and call of hot function in root component?

theKashey commented 5 years ago

@otakustay - production mode of babel plugin could remove hot calls today.