redfin / react-server

:rocket: Blazing fast page load and seamless navigation.
https://react-server.io/
Apache License 2.0
3.89k stars 184 forks source link

Client-side hot module replacement does not work #970

Closed salehhamadeh closed 5 years ago

salehhamadeh commented 6 years ago

If you modify a file while react-server is running with hot: true, the server updates the file and the client receives the updated file (can be seen in the browser console), but the new component is not used. This broke down when we upgraded react-hot-loader to v3. We had to do this because react-hot-loader v1 depended on ReactMount, which is no longer supported in React 16. The new version of react-hot-loader requires us to tell a component how to render itself. This is shown in "Step 2: Using HMR to replace the root component" on react-hot-loader's Getting Started page http://gaearon.github.io/react-hot-loader/getstarted/