Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 363 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 363 Bytes

Install

yarn add react-loadable

Example

import Loadable from 'react-loadable';
import Loading from './my-loading-component';

const LoadableComponent = Loadable({
  loader: () => import('./my-component'),
  loading: Loading,
});

export default class App extends React.Component {
  render() {
    return <LoadableComponent/>;
  }
}