Last active
March 12, 2022 16:29
-
-
Save amarbalu/0bce63e8496759e8214c025ad7f3614d to your computer and use it in GitHub Desktop.
Loadable Function
This file contains 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 Loadable from 'react-loadable'; | |
import Loading from './Loading'; | |
export default Loadable({ | |
loader: () => | |
import(/* webpackChunkName: "ComponentName" */ 'components/componentName'), | |
modules: ['components/componentName'], | |
loading: () => Loading, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment