I'm trying to access the variable of input
called name but it throws undefined
. How can I access the data of input
of reactstrap?
Any ideas? This is my code:
handleSubmit(e){
e.preventDefault();
console.log(this.name);
}
<form onSubmit={this.handleSubmit}>
<Input ref={(input) => (this.name= input)} type="text" value={this.state.value} onChange={this.handleChange} />
<Button color="info" >Add</Button></td>
</form>