useDocumentTitle
Custom hook that sets the document title.
Installation
npx sse-tool add use-document-title
npm install sse-hooks
Usage
import { useDocumentTitle } from "./{hooks file}";
useDocumentTitle("My new title");
import { useDocumentTitle } from "sse-hooks";
useDocumentTitle("My new title");
API
Parameters
| Name | Type | Description |
|---|---|---|
| title | string | The title to set. |
| options | UseDocumentTitleOptions | The options. |