React hook for updating the document-title
Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.
You'll need to install
react,react-dom, etc at^16.7.0-alpha.0
yarn add @rehooks/document-titleimport useDocumentTitle from '@rehooks/document-title';
function MyComponent() {
useDocumentTitle('Page Title');
return <div/>;
}