gaearon / gaearon/react-hot-loader

Allow hooking into HMR hooks for Webpack

Open
#993 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
775
PR merge metrics
No merged PRs in 30d

Description

### Description

I'm trying to add this to my root module:

![image](https://user-images.githubusercontent.com/12100/40590825-0a1bf79a-61bb-11e8-9d4b-ba0bb273088c.png)

Which would let me hook into a simple hydrate/dehydrate system I had setup from our previous HMR stuff. But if I add those lines, the regular HMR doesn't seem to get called.

### Expected behavior

Should have a hook for adding module.hot listeners.

### Actual behavior

Webpack seems to not allow more than one.

### Environment

React Hot Loader version: 4.2.0

Run these commands in the project folder and fill in their results:

1. `node -v`: 9.8.0
2. `npm -v`: 5.6.0

Then, specify:

1. Operating system: High Sierra
2. Browser and version: Chrome 46

Correct me if I'm wrong. I can refresh and try with and without and it seems to be the case. I think an extra hook like this would be sufficient:

```
hot(module, status => {
// my extra hooks
})(Component)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.