Skip to content

useFavicon ​

browser
test coverage
Last changed: last month

Hook that manages the favicon

typescript
import { useFavicon } from '@siberiacancode/reactuse';

Usage ​

typescript
const { href, set } = useFavicon('https://www.google.com/favicon.ico');

Demo ​

Api ​

Parameters

NameTypeDefaultNote
initialFavicon?string-The initial favicon. If not provided, the current favicon will be used

Source ​

Source • Demo

Contributors ​

Avatardebabin
Avatarhywax

Released under the MIT License.