set-title

A function that sets the title of the web page.

Installation#

npm install @iqmetrix/set-title

Interface#

function setTitle(title: string): Promise

Example#

import { setTitle } from "@iqmetrix/set-title";
function withTitle(Page: React.ComponentType) {
const HOC: React.FC = props => {
setTitle("iQmetrix Hub");
return <Page {...props} />;
};
return HOC;
}

See tests for more examples.

Sources#

Last updated on by Michelle Wiebe