Closed AndrewRayCode closed 7 years ago
Just started getting this issue as well - no idea what's triggered the change. The only thing I did was extract a class into its own file, but I don't think that caused it.
@InfernoZeus what version of React are you using? Wondering if component classes changed something internally recently. Or maybe how Babel handles classes?
For me: React 15.2.1 babel-core 6.11.4
I'm using the same version of React, and a slightly earlier version of babel-core: 6.10.4
I've had the same problem.
user import { autobind } from 'core-decorators'
https://github.com/gaearon/react-transform-catch-errors/issues/26 probably related
@VinceFanZ Did not work for me with core-decorators
@smashercosmo if my dependency's dependency has react-transform-catch-errors and i have transform-decorators-legacy, could this still causing issues?
This might be related:
https://github.com/jayphelps/core-decorators.js/issues/48#issuecomment-200592851
I'm still receiving the Uncaught TypeError: Cannot set property render of #<ComponentName> which has only a getter
when binding to the class, e.g.
@autobind
class Component { }
Has this issue been addressed? Please advise.
source: https://github.com/gaearon/react-transform-catch-errors/issues/26#issuecomment-197078851
I think this project is abandonware that will only work with older versions of something (babel? react?)
met the same problem, anything else solution?
I fixed it long time ago in react-transform-catch-errors https://github.com/gaearon/react-transform-catch-errors/commit/afbbda89959e886e636d00427f20b6efc80bf441 It just wasn't published. Installing directly from master should work for everyone who faced this issue.
98968ee should have fixed this. Please try the latest master branch :)
With react-hot-loader 3 this worked with version v1.4.1 as well.
Tested now with v2.1.0, still works.
I'm guessing I'm missing something but not sure what.
My
.babelrc
:My webpack loader config:
My
.eslintrc
(I have no idea if both of these are needed):In my React component, I use the autobind decorator:
But I get the runtime error: