Created
March 29, 2021 19:45
-
-
Save code08-ind/7450de8c12cff59f0aa4ecac70869b26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useEffect} from 'react'; | |
const useIncrement = (state) => { | |
useEffect(() => { | |
document.title = state === 0 ? "Chats" : `Chats(${state})`; | |
}, [state]); | |
} | |
export default useIncrement; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment