Last active
December 15, 2022 14:42
-
-
Save luismartinezs/30e7681ac6c133331a2aaaeb4627d390 to your computer and use it in GitHub Desktop.
render count #react
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
function useLogCount(msg) { | |
const count = useRef(1); | |
useEffect(() => { | |
console.debug(msg, count.current); | |
count.current++; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment