React hook that gets the current document title and watches for changes.
npm install @daveyplate/use-document-title
import { useDocumentTitle } from '@daveyplate/use-document-title'
function Header() {
const documentTitle = useDocumentTitle()
return (
<h1>
{documentTitle}
</h1>
)
}