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

ryuapp/preact-easy-title

Repository files navigation

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