andreypopp / autobind-decorator

Decorator to automatically bind methods to class instances
MIT License
1.45k stars 66 forks source link

Add setters for bound methods #29

Closed Rogeres closed 7 years ago

Rogeres commented 8 years ago

Hello. I want to use the @autobind decorator with this awesome React babel plugin by @gaearon

https://github.com/gaearon/react-transform-catch-errors

But when the page loads I get Cannot set property render of #<Component> which has only a getter error in the console.

The fix is to add a setter (see the code).

srolel commented 7 years ago

I would love this for testing!