@uiw/react-head
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@uiw/react-head", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "React components will manage your changes to the document head", | ||
@@ -5,0 +5,0 @@ "author": "Kenny Wong <wowohoo@qq.com>", |
@@ -24,4 +24,4 @@ react-head | ||
export default function App() { | ||
const [title, setTitle] = useState("My Title"); | ||
const click = () => setTitle(title === 'My Title' ? 'Hello World' : 'My Title') | ||
const [count, setCount] = useState(1); | ||
const click = () => setCount(count + 1) | ||
return ( | ||
@@ -31,7 +31,7 @@ <div className="container"> | ||
<Head.Meta charSet="utf-8" /> | ||
<Head.Title>{title}</Head.Title> | ||
<Head.Title>{count} React Head</Head.Title> | ||
<Head.Link rel="canonical" href="https://uiwjs.github.io" /> | ||
</Head> | ||
<button onClick={click}> | ||
Switch Title - "{title}" | ||
Switch Title - "{count}" | ||
</button> | ||
@@ -106,2 +106,9 @@ </div> | ||
### Modify Favicon | ||
```jsx | ||
<Head.Link rel="icon" href="/favicon.ico" /> | ||
<Head.Link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
``` | ||
## All Sub Components | ||
@@ -108,0 +115,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30233
161