Skip to content

Instantly share code, notes, and snippets.

@reime005
Created July 26, 2020 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reime005/b07417a087bfee006b5b579e2f8bd0bd to your computer and use it in GitHub Desktop.
Save reime005/b07417a087bfee006b5b579e2f8bd0bd to your computer and use it in GitHub Desktop.
import * as React from 'react';
const VeryBigJokesList = React.lazy(() => import('./VeryBigJokesList'));
function App() {
return (
<div className="App">
<header className="App-header">
<div style={{ maxWidth: 600 }}>
<React.Suspense fallback={<p>Loading list...</p>}>
<VeryBigJokesList />
</React.Suspense>
</div>
</header>
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment