I have an onChange
prop like so:
onChange={ (value) => this._onChange(value) }
and this works perfectly fine. However, if I try to abstract that so that I'm not using an inline function, I get an error.
_onChangeHandler = () => (value) => this._onChange(value)
Then in the component,
onChange={ this._onChangeHandler() }
This completely breaks the component. Why does this not work?
Update:
The onChange is for a form field, and in the input element, when I type in it, I see [object Object]