useDocumentTitle ​
Hook that manages the document title and allows updating it
typescript
import { useDocumentTitle } from '@elysiumorg/solid-use';Usage ​
typescript
const [title, setTitle] = useDocumentTitle();
Demo ​
Api ​
Parameters
| Name | Type | Default | Note | 
|---|---|---|---|
| value? | string | - | The initial title. If not provided, the current document title will be used | 
| options.restoreOnUnmount? | boolean | - | Restore the previous title on unmount |