1.0.2 • Published 5 years ago

@am-hooks/use-title v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

useTitle

브라우저 탭 제목을 변경

Installation

yarn

yarn add @am-hooks/use-title

npm

npm i @am-hooks/use-title

Usage 1

import React from "react";
import useTitle from "@am-hooks/use-title";

const App = () => {
  useTitle("change title");

  return <h1>HELLO</h1>;
}

Usage 2

import React from "react";
import useTitle from "@am-hooks/use-title";

const App = () => {
  const titleUpdater = useTitle("Loading...");
  setTimeout(() => titleUpdater("Home"), 3000);

  return <h1>HELLO</h1>;
}

Arguments

ArgumentTypeDescriptionRequired
titlestringThe title you want to use on your documentyes