gaearon / gaearon/react-hot-loader
My component doesn't recognize the new description method and doesn't keep states except root component
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 775
- PR merge metrics
- No merged PRs in 30d
Description
If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.
### Description
My component doesn't recognize the new description method and doesn't keep states except root component.
Instead, it worked when I described old style(export default hot(module)(App)).
However, my components didn't keep states except a component that I declared hot.
×
```
import { hot } from 'react-hot-loader/root'
const App = () =>
export default hot(App)
```
○
```
import { hot } from 'react-hot-loader'
const App = () =>
export default hot(module)(App)
```
### Expected behavior
What you think should happen:
My root component should accept the new description.
Keep states when I modify any other components.
### Actual behavior
What actually happens:
My root component recognized old description method.
### Environment
React Hot Loader version:4.6.5
Run these commands in the project folder and fill in their results:
1. `node -v`: 10.15.0
2. `npm -v`: 6.4.1
Then, specify:
1. Operating system:
Windows 10 Pro ver1803 17134.590
2. Browser and version:
Google Chrom ver: 71.0.3578.98(Official Build) (64bit)
### Reproducible Demo
Please take the time to create a new project that reproduces the issue.
You can copy your project that experiences the problem and start removing things until you’re left with the minimal reproducible demo. This helps contributors, and you might get to the root of your problem during that process.
Push to GitHub and paste the link here.
Contributor guide
Assessment
This issue has not been assessed yet.