useFaviconReact side-effect hook sets the favicon of the page.
import {useFavicon} from 'react-use';
const Demo = () => {
useFavicon('https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico');
return null;
};
// TODO: implement useFavicon function notImplemented(..._args: any[]): any { throw new Error('Not implemented'); } export default notImplemented; export const useFavicon = notImplemented;
Tests