useDocumentTitle
Custom hook that sets the document title.
Installation
npx sse-hooks add use-document-title
yarn dlx sse-hooks add use-document-title
pnpm dlx sse-hooks add use-document-title
deno run -A npm:sse-hooks add use-document-title
bunx sse-hooks add use-document-title
Usage
example.ts
import { useDocumentTitle } from "./{hooks file}";
useDocumentTitle("My new title");
API
Parameters
| Prop | Default | Type |
|---|---|---|
options |
|
The options.
|
title | - |
The title to set. |
Returns
| Return Value | Default | Type |
|---|---|---|
return | - |
Hook return value |
Types Aliases
No specific type aliases defined for this component.