@am-hooks/use-title

Change browser tab title

Usage no npm install needed!

<script type="module">
  import amHooksUseTitle from 'https://cdn.skypack.dev/@am-hooks/use-title';
</script>

README

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

Argument Type Description Required
title string The title you want to use on your document yes