Skip to content

Instantly share code, notes, and snippets.

@Robdel12
Created August 30, 2017 21:59
Show Gist options
  • Save Robdel12/a2d2475fcab482d0e9cf3a45cc0f76da to your computer and use it in GitHub Desktop.
Save Robdel12/a2d2475fcab482d0e9cf3a45cc0f76da to your computer and use it in GitHub Desktop.
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