react-modify-favicon
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

useFavicon

if you want to update the Favicon of your react page dynamically this is your hook. in order to change the Favicon, you will need to pass the Image url as parameter to the hook, it will upate the Favicon of the current react page.

API

Arguments

  • url - The URL of the Favicon you want to use.

Example

import useFavicon from "react-modify-favicon";
import React from 'react'
import ReactDOM from 'react-dom'

const App = () => {
 useFavicon('https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196')
  return <div />
}

ReactDOM.render(<App />, document.getElementById('root'))

Installation

npm i react-modify-favicon

Package Sidebar

Install

npm i react-modify-favicon

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

1.91 kB

Total Files

4

Last publish

Collaborators

  • shreyashsid