Appearance
useTitle
用于管理页面标题的 Hook。
Demo
</>
Usage
import { useTitle } from 'v3-use'
const [title, setTitle] = useTitle()
import { useTitle } from 'v3-use'
const [title, setTitle] = useTitle()
Reference
Type Declarations
export interface Options {
restoreOnUnmount: boolean
}
export declare function useTitle(
title?: string,
options?: Options
): [Ref<string>, (value: string | ((c: string) => string)) => void]
export interface Options {
restoreOnUnmount: boolean
}
export declare function useTitle(
title?: string,
options?: Options
): [Ref<string>, (value: string | ((c: string) => string)) => void]