Last active
June 20, 2019 10:41
-
-
Save eyaleizenberg/742700d7240a021efdb2a4056dc18b51 to your computer and use it in GitHub Desktop.
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
const OtherComponent = React.lazy(() => import('./OtherComponent')); | |
function MyComponent() { | |
return ( | |
<div> | |
<React.Suspense fallback={<div>Loading...</div>}> | |
<OtherComponent /> | |
</React.Suspense> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment