Last active
May 25, 2018 07:18
-
-
Save dferber90/eddefb9c5815c2f1469a2991a8eefcd9 to your computer and use it in GitHub Desktop.
Test a Render Prop!
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 SuperApp = () => ( | |
<div style={{ height: '100%' }}> | |
<Mouse | |
render={({ x, y }) => ( | |
<MouseDown | |
render={({ down }) => ( | |
<h1> | |
The mouse position is ({x}, {y}) | |
and the button is {down ? 'down' : 'up'} | |
</h1> | |
)} | |
/> | |
)} | |
/> | |
</div> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment