Last active
May 10, 2017 12:21
-
-
Save azpwnz/2133b7d22c463fe19140c5c6597469f0 to your computer and use it in GitHub Desktop.
Nested conditional statements is JSX
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
// In order to use nested contitionals, they must be wrapped into container like array | |
{ this.state.companies | |
? <h3>Companies</h3> | |
: [ | |
(this.state.loading | |
? <p>Loading...</p> | |
: null | |
) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment