rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
21 lines • 771 B
TypeScript
type UseDocumentTitleOptions = {
resetOnUnmount?: boolean;
};
/**
* useDocumentTitle hook
*
* This hook allows you to set the document title.
*
* @param title - The new title for the document
* @param options - An optional object with a `resetOnUnmount` property to control whether the document title should be reset to its previous value when the component is unmounted. Defaults to false.
*
* @example
* function App() {
* useDocumentTitle("My App", { resetOnUnmount: true });
* return <div>Hello, world!</div>;
* }
* @see {@link https://rooks.vercel.app/docs/useDocumentTitle}
*/
declare function useDocumentTitle(title: string, options?: UseDocumentTitleOptions): void;
export { useDocumentTitle };
//# sourceMappingURL=useDocumentTitle.d.ts.map