Last active
March 23, 2023 09:00
-
-
Save aleksnick/494f66e2851bc5483e50b029444d3c82 to your computer and use it in GitHub Desktop.
About hooks
This file contains hidden or 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 TestComponent({ obj }) { | |
if (!obj.someField) { | |
return null; | |
} | |
const value = useSelector(customExpensiveSelector(obj.someField)); | |
return ( | |
<div>{value}</div>; | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment