Skip to content

Instantly share code, notes, and snippets.

@donfour
Created January 4, 2021 10:10
Show Gist options
  • Save donfour/c923db0fed75e37ac971a7cdd56fd22b to your computer and use it in GitHub Desktop.
Save donfour/c923db0fed75e37ac971a7cdd56fd22b to your computer and use it in GitHub Desktop.
Lazy loading in React
const MyComponent = React.lazy(() => import('./MyComponent.js'));
import MyComponent from './MyComponent.client.js';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment