useFavicon()
The
useFavicon() hook allows you to programmatically change the browser tab icon (favicon). It automatically restores the original favicon when the component unmounts.Import
typescript
Usage
Check your browser tab! 👆
Click the buttons below to dynamically change the browser tab icon.
Component.tsx
API
Arguments
href– string The URL or Data URI of the new favicon image.
Returns
This hook returns
void.