Instantly share code, notes, and snippets.

Embed
What would you like to do?
render() {
const { components } = this.state;
return (
<div className="App">
...
<div className="views">
<Suspense fallback={<div>Loading a view</div>}>
{components.length === 0 ? (
<div>Nothing to display...</div>
) : (
components
)}
</Suspense>
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment