Last active
November 20, 2018 17:34
-
-
Save labidiaymen/06a165491cce0b0988f699ada2007341 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
function MainForm() { | |
const pageTitle = useFormInput(''); | |
//as simple as that | |
useEffect(() => { | |
document.title = pageTitle.value; | |
}); | |
return ( | |
<div> | |
<div className="form-control"> | |
<TextField label="Page Title" {...pageTitle} /> | |
</div> | |
</div> | |
); | |
} | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<header className=""> | |
<MainForm /> | |
</header> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment