Skip to content
On this page

useTitle

A hook that set title of the page.

代码演示

API

useTitle(title: string, options?: Options);
useTitle(title: string, options?: Options);

Params

PropertyDescriptionTypeDefault
titlePage titleRef<string>-

Options

PropertyDescriptionTypeDefault
restoreOnUnmountWhether to restore the previous page title when the component is unmountedbooleanfalse

Source

SourceDocsDemo