UNPKG

@supunlakmal/hooks

Version:

A collection of reusable React hooks

9 lines (8 loc) 438 B
/** * Dynamically sets the website's favicon. * * @param url The URL of the new favicon image (e.g., '/favicon.ico', '/logo.png'). * Pass null or an empty string to potentially revert or do nothing (behavior might depend on browser). * @param rel The relationship attribute, usually 'icon' or 'shortcut icon'. Defaults to 'icon'. */ export declare function useFavicon(url: string | null | undefined, rel?: string): void;