useDocumentTitle
Custom hook that sets the document title.
Custom hook that sets the document title.
Usage
import { useDocumentTitle } from "@tilt-legal/cubitt-components/utilities/hooks";
useDocumentTitle('My new title');API
Signature
declare function useDocumentTitle(title: string, options?: UseDocumentTitleOptions): void;Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
title | string | The title to set. | - |
[options] | ?UseDocumentTitleOptions | The options. | - |
Return Value
| Value | Type | Description |
|---|---|---|
return | void | Value returned by the hook. |
useCopyToClipboard
Custom hook that copies text to the clipboard using the [`Clipboard API`](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API).
useLocalStorage
Custom hook that uses the [`localStorage API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to persist state across page reloads.