kjanoudi/joiful-react-forms

Remove autobind-decorator

Closed this issue · 6 comments

jaulz commented

Please remove the autobind-decorator from the dependencies. Instead simply use the following in the constructor:
this.getStateFromProps = this.getStateFromProps.bind(this)

If you don't like this please set it at least as a dependency and not as a dev dependency. Currently it triggers an exception and requires a manual installation of autobind-decorator.

I agree. Do you mind submitting a PR?

jaulz commented

Great!
Please see: #27

On second thought, you shouldn't need autobind-decorator as a dependency.. (I could be wrong)

@kjanoudi thoughts?

jaulz commented

At least the dist version on npm contains this:

var _autobindDecorator = require('autobind-decorator');

This is obviously not installed because it is a dev dependency.

Yeah, you're totally right.