Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from "react";
- class App extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ""
- }
- }
- onChange(e){
- this.state({
- value: e.target.value
- })
- }
- render(){
- return(
- <div>
- <input type="text" onChange={(e) => this.onChange(e)}/>
- </div>
- )
- }
- }
- export default App
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement