Skip to content

Instantly share code, notes, and snippets.

@JakenHerman
Created January 13, 2020 16:04
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/cfd3fb750a49e9791a4d552bf088ab36 to your computer and use it in GitHub Desktop.
Save JakenHerman/cfd3fb750a49e9791a4d552bf088ab36 to your computer and use it in GitHub Desktop.
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