Skip to content

Instantly share code, notes, and snippets.

@dance2die

dance2die/render.js

Created Dec 4, 2017
Embed
What would you like to do?
render.js
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