Last active
May 24, 2019 11:24
-
-
Save PierreCavalet/3aa6dd2cb2cf5b83930505aa5a2fd80d to your computer and use it in GitHub Desktop.
Async Heavy
This file contains hidden or 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
import React, { Suspense, lazy } from 'react' | |
const LazyHeavy = lazy(() => import('./Heavy')) | |
export default function AsyncHeavy() { | |
return ( | |
<div> | |
<Suspense fallback={<div>Loading...</div>}> | |
<LazyHeavy /> | |
</Suspense> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment