@react-hookz/web
Version:
React hooks done right, for browser and SSR.
19 lines (18 loc) • 590 B
TypeScript
export interface IUseDocumentTitleOptions {
/**
* Function that processes title, useful to prefix or suffix the title.
* @param title
*/
wrapper: (title: string) => string;
/**
* Restore title that was before component mount on unmount.
*/
restoreOnUnmount: boolean;
}
/**
* Sets title of the page.
*
* @param title Title to set, if wrapper option is set, it will be passed through wrapper function.
* @param options Options object.
*/
export declare function useDocumentTitle(title: string, options?: Partial<IUseDocumentTitleOptions>): void;