I really do not understand the selected answer, and the violin just returns an empty object.
Further read this document when using ES6, you will find:
render: function() { return <TextInput ref={(c) => this._input = c} />; }, componentDidMount: function() { this._input.focus(); },
So, you need to assign this var component to which you can hang, possibly on this , as in the example, and then you can use this._input to control your component.
Khanetor
source share