class Input {
render() {
return <input {...props} />
}
}
class MyComponent extends Component {
constructor(props) {
super(props);
this.state = {};
}
handleChange = e => {
this.setState({e.target.value});
}
render() {
return <Input type="text" onChange={this.handleChange} value={this.state.value} />
}
}