gaearon / gaearon/react-hot-loader

mobx-react @inject decorators and @computed with error.

Open
#1,092 5 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

When use mobx-react @inject decorators and @computed, will fail with Uncaught TypeError.

`this` in the computed prop:
Before HMR:
![image](https://user-images.githubusercontent.com/14135808/47782693-cd2eb780-dd3b-11e8-8abc-03680302497f.png)
After HMR:
![image](https://user-images.githubusercontent.com/14135808/47782703-d61f8900-dd3b-11e8-9b84-b46794a50361.png)

Removing @computed prop or not using @inject will be fine.

### Environment

React Hot Loader version:4.3.5
node: 8.11.3
npm: 5.6.0

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.