Skip to content

Instantly share code, notes, and snippets.

@azpwnz
Last active May 10, 2017 12:21
Show Gist options
  • Save azpwnz/2133b7d22c463fe19140c5c6597469f0 to your computer and use it in GitHub Desktop.
Save azpwnz/2133b7d22c463fe19140c5c6597469f0 to your computer and use it in GitHub Desktop.
Nested conditional statements is JSX
// 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