react-document-title-hook 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # react-document-title-hook
2
+
3
+ A tiny React component to update the document title.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install react-document-title-hook
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react"),c=({title:e})=>(t.useEffect(()=>{document.title=e},[e]),null);module.exports=c;
package/dist/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ import { useEffect as e } from "react";
2
+ const u = ({ title: t }) => (e(() => {
3
+ document.title = t;
4
+ }, [t]), null);
5
+ export {
6
+ u as default
7
+ };
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "react-document-title-hook",
3
+ "version": "1.0.0",
4
+ "description": "A tiny React component to update the document title",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "files": ["dist"],
8
+ "scripts": {
9
+ "build": "vite build"
10
+ },
11
+ "peerDependencies": {
12
+ "react": "^17.0.0 || ^18.0.0"
13
+ },
14
+ "keywords": ["react", "document-title", "hook"],
15
+ "author": "Your Name",
16
+ "license": "MIT"
17
+ }