Created
August 30, 2015 17:51
-
-
Save iest/e2304e2b5d4c83684615 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
render() { | |
const isSmallScreen = window.matchMedia('(max-width: 30em)').matches; | |
return ( | |
isSmallScreen ? | |
<p>This will only render if the window is smaller than 30em</p> | |
: | |
<p>This will only render if the window is 30em or more<p> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment