Page title manager for whatsup.
npm i whatsup-document-title
// OR
yarn add whatsup-document-title
Local demo:
git clone https://github.com/andrelmlins/whatsup-document-title.git
cd whatsup-document-title
npm install && npm rum dev
An example of how to use the library:
import { Fractal, conse } from 'whatsup';
import WhatsupDocumentTitle from 'whatsup-document-title';
export class App extends Fractal<JSX.Element> {
readonly title = conse('Page title');
*whatsUp() {
while (true) {
yield (
<>
<WhatsupDocumentTitle title={yield* this.title}>
<input
value={yield* this.title}
onInput={(e) => this.title.set(e.target.value)}
/>
</WhatsupDocumentTitle>
</>
);
}
}
}
Component props:
Prop | Type | Description |
---|---|---|
title | string | Title showing in document |
Download stats for this NPM package
Whatsup Document Title is open source software licensed as MIT.