Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const MyAwesomeComponent = asyncComponent(() => import('./components/MyAwesomeComponent'));
// some code
render() {
const { ConditionalRender } = this.state;
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
{ConditionalRender &&
<MyAwesomeComponent />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment