@daveyplate/use-document-title
v1.0.1
Published
React hook to get the document title and watch for changes
Downloads
79
Readme
use-document-title
React hook that gets the current document title and watches for changes.
Install
npm install @daveyplate/use-document-title
Usage
import { useDocumentTitle } from '@daveyplate/use-document-title'
function Header() {
const documentTitle = useDocumentTitle()
return (
<h1>
{documentTitle}
</h1>
)
}