React favicon
React favicon (opens in a new tab) library is used to Control the favicon from a React app.
Official Demo
Can have a look at their official Demo (opens in a new tab)
import Favicon from 'react-favicon';
const [notificationCount, setNotificationCount] = useState(0);
const updateCount = () =>{
setNotificationCount((prevCount) => prevCount + 1);
}
return (
.
.
<Favicon
url="http://oflisback.github.io/react-favicon/img/github.ico"
alertCount={notificationCount}
/>;
.
.
)