Created
April 27, 2017 04:50
-
-
Save kuanhsuh/e29183e3c7423eefd20cee7b25eee1c7 to your computer and use it in GitHub Desktop.
react snippet
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 { post } = this.props; | |
if(!post){ | |
return <div></div>; | |
} | |
To deal with undefined props |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment