Skip to content

Instantly share code, notes, and snippets.

@JakenHerman
Created January 13, 2020 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakenHerman/c039a98ce3db2ceacfac260883da8df8 to your computer and use it in GitHub Desktop.
Save JakenHerman/c039a98ce3db2ceacfac260883da8df8 to your computer and use it in GitHub Desktop.
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
titleName: ''
};
}
changeTitle(ev) {
this.setState({
titleName: ev.target.value
});
}
render() {
return (<div className="App"><h1>{this.state.titleName}</h1><input onChange={this.changeTitle.bind(this)}></input></div>);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment