import React, { Component } from 'react'
class App extends Component {
constructor(props) {
super(props);
this.state = {
text: "default"
}
}
inputChange=(e)=>{
this.setState({
text:e.target.value
})
}
render() {
return (
<div>
<input type="text" value={this.state.text} onChange={this.inputChange}/>
<p>{this.state.text}</p>
</div>
)
}
}
export default App;