Created
September 29, 2023 03:29
-
-
Save masious/75270603cf59da9ca7eefb885416294a to your computer and use it in GitHub Desktop.
How would be the performance of this code?
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 SlowLogger({ value = [] }) { | |
const cb = useCallback(() => { | |
console.log(value) | |
}, [value]) | |
return ( | |
<div onClick={cb}> | |
Log the array to the console! | |
</div> | |
) | |
} | |
function App() { | |
return <SlowLogger /> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment