@4leaf.ysh/use-title 中文文档教程
@4leaf-Hooks/use-title
React Hooks 更新文档的标题。
installation
纱线
yarn add @4leaf.ysh/use-title
npm
npm install @4leaf.ysh/use-title
Usage
import React from "react";
import useTitle from "@4leaf.ysh/use-title";
function App() {
useTitle("Welcome");
return <h1>Welcome</h1>;
}
Arguments
Argument | Type | Description | Required |
---|---|---|---|
title | string | The title you want to use on your document | YES |
@4leaf-Hooks/use-title
React Hooks to update your document's title.
installation
yarn
yarn add @4leaf.ysh/use-title
npm
npm install @4leaf.ysh/use-title
Usage
import React from "react";
import useTitle from "@4leaf.ysh/use-title";
function App() {
useTitle("Welcome");
return <h1>Welcome</h1>;
}
Arguments
Argument | Type | Description | Required |
---|---|---|---|
title | string | The title you want to use on your document | YES |