Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (34 loc) · 586 Bytes

README.md

File metadata and controls

43 lines (34 loc) · 586 Bytes

Preact-easy-title

Easy title for Preact.

Installation

npm i preact-easy-title

Example

import Title from "preact-easy-title";

const websiteName = "Preact";

export function MainPage() {
  return (
    <div>
      <Title>{ websiteName }</Title>
    </div>
  );
}
export function AboutPage() {
  return (
    <div>
      <Title>{ "About | " + websiteName }</Title>
    </div>
  );
}
export function ContactPage() {
  return (
    <div>
      <Title>Contact | { websiteName }</Title>
    </div>
  );
}

License

MIT