Created
July 24, 2019 12:40
-
-
Save tareefdev/660d3de185e0c05401d280478853809c to your computer and use it in GitHub Desktop.
// source https://jsbin.com
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
const parent = ({data}) => { | |
const [hoveredDistrict, setHoveredDistrict] = useState('hi'); | |
console.log('I re-rendered!'); | |
return ( | |
<div> | |
<firstComponent/> | |
<secondComponent setHoveredDistrict={setHoveredDistrict} /> | |
<div> {HoveredDistrict} </div> | |
<thirdComponent/> | |
</div> | |
) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment