Skip to content
React hook for updating the document-title
JavaScript HTML
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml Init Oct 25, 2018
LICENSE
README.md Update the example, and readme Oct 25, 2018
example.html Init Oct 25, 2018
example.js Update the example, and readme Oct 25, 2018
index.d.ts Update the example, and readme Oct 25, 2018
index.js Init Oct 25, 2018
index.js.flow Update index.js.flow (#1) Feb 27, 2019
package.json Update packages, bump version and publish Feb 27, 2019
test-setup.js Init Oct 25, 2018
test.js Init Oct 25, 2018
yarn.lock Update packages, bump version and publish Feb 27, 2019

README.md

@rehooks/document-title

React hook for updating the document-title

Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.

You'll need to install react, react-dom, etc at ^16.7.0-alpha.0

Install

yarn add @rehooks/document-title

Usage

import useDocumentTitle from '@rehooks/document-title';

function MyComponent() {
  useDocumentTitle('Page Title');
  return <div/>;
}
You can’t perform that action at this time.