Created
August 30, 2017 21:59
-
-
Save Robdel12/a2d2475fcab482d0e9cf3a45cc0f76da 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
import React, { Component } from 'react' | |
class App extends Component { | |
render() { | |
let isCondition = false; | |
let Component = isCondition ? <OneComponent /> : <AnotherComponent />; | |
return ( | |
<div> | |
<Component /> | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment