Created
January 13, 2020 16:04
-
-
Save JakenHerman/cfd3fb750a49e9791a4d552bf088ab36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Helmet } from 'react-helmet'; | |
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"> | |
<Helmet> | |
<title>{this.state.titleName}</title> | |
</Helmet> | |
<input onChange = { this.changeTitle.bind(this)}></input> | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment