Last active
March 25, 2020 16:46
-
-
Save akdetrick/50264176d8e8a78c8181ba5cccd92bee to your computer and use it in GitHub Desktop.
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
const Site = (props) => ( | |
{/* | |
π€ props.imgUrl isn't being used in here. | |
π¨ I'm too scared to change it because I don't know what it does. | |
*/} | |
<Header {...props} /> | |
); | |
const Header = (props) => { | |
{/* | |
π€ What's getting passed? | |
π€ Which props do Logo and Navigation actually need? | |
π¨ What if I need to move Logo into a different component? | |
π‘ this component re-renders when props.imgUrl changes, but it's not even being used here! | |
*/} | |
<Logo {...props} /> | |
<Navigation {...props} /> | |
}; | |
const Logo = (props) => { | |
{/* | |
π€ Where is this imgUrl prop even coming from? I don't see it in the parent | |
π‘ this should have been an easy change | |
*/} | |
<img src={props.imgUrl} /> | |
{/* | |
π‘ this div is getting invalid DOM attributes | |
*/} | |
<div {...props}>lol</div> | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment