@ziphooks/use-title

1.0.0 • Public • Published

@ziphooks/use-title

React Hook for changing a title from HTML.

Installation

yarn

yarn add @ziphooks/use-title

npm

npm i @ziphooks/use-title

Usage

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

function App() {
  const changeTitle = useTitle("Home");
  setTimeout(() => {
      changeTitle("Hi");
  }, 3000);
  return <h1>The title is going to change to 'Home' and change to 'Hi' in 3 seconds</h1>;
};

Arguments

Argument Type Description Required
initialTitle String A string for initial a title from HTML true

Return

Return value Type Description
setTitle Function A function to change a title from HTML

Readme

Keywords

Package Sidebar

Install

npm i @ziphooks/use-title

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

1.76 kB

Total Files

4

Last publish

Collaborators

  • zipperdev