Created
December 4, 2017 01:46
-
-
Save dance2die/38d1a142aac8cb42770cc1589d2fb8cc to your computer and use it in GitHub Desktop.
render.js
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
render() { | |
const { components } = this.state; | |
if (components.length === 0) return <div>Loading...</div>; | |
const componentsElements = components.map(Component => ( | |
<Component key={shortid.generate()} /> | |
)); | |
return <div className="App">{componentsElements}</div>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment