-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-map-gl breaks when RHL is in place #858
Comments
Autobind uses .getPrototypeOf to get methods, and then hooks them. In this case |
+1 we've had to disable react-hot-loader as a result. I flagged this issue with react-mapbox-gl at visgl/react-map-gl#461 |
@theKashey, don't know much about the current architecture, so a question - does RHL have to wrap dependencies with Proxy? would it make sense/be possible to exclude it from touching anything in node_modules? |
This is not related to React-Hot-Loader, this is more related to the React or even Javascript itself. Meanwhile, I've got it sorted, going to open PR in React-Hot-Loader in an hour. Just have to write some tests beforehand. |
Should be fixed in beta.23. |
Description
Having react-map-gl in a project with RHL, throws errors.
Here's a simple repo
https://github.com/elado/bug-react-hot-loader-react-map-gl
Error is related to bound methods and the way the proxy is applied:
This seems to be related to
autobind
https://github.com/uber/react-map-gl/blob/master/src/components/static-map.js#L79
https://github.com/uber/react-map-gl/blob/b50de38ab0dfed9e976e1d2e6b0c040629bd82b5/src/utils/autobind.js
But in any case, the expectation is that RHL won't break the code.
Environment
Latest create-react-app - react 16.2, react-hot-loader 4.0.0-beta.22, react-map-gl ^3.2.4
Reproducible Demo
https://github.com/elado/bug-react-hot-loader-react-map-gl
The text was updated successfully, but these errors were encountered: