Created
February 14, 2019 03:49
-
-
Save QMaximillian/553131b7be902c1677369a94558da5d6 to your computer and use it in GitHub Desktop.
Render Prop - SayHello
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 SayHello = () => ( | |
<Hello | |
render={({ loud, word, handleLoudness }) => ( | |
<h1> | |
<b onClick={handleLoudness}> | |
{loud ? word : word.toUpperCase()}</b> | |
</h1> | |
)} | |
/> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment