Guest User

Untitled

a guest
Sep 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import * as React from 'react';
  2. import * as Loadable from 'react-loadable';
  3. import OptionsWithRender = LoadableExport.OptionsWithRender;
  4. import AsyncLoader from '../components/AsyncLoader';
  5. import {IProps} from './AddBeer';
  6.  
  7. const loadableOptions: OptionsWithRender<IProps, any> = {
  8. loader: () => import(/* webpackChunkName: "AddBeer" */ './AddBeer'),
  9. loading: AsyncLoader,
  10. render(loaded: any, props: IProps) {
  11. const Component: any = loaded.default; // tslint:disable-line:variable-name
  12.  
  13. return <Component {...props} />;
  14. },
  15. };
  16.  
  17. export default Loadable(loadableOptions);
  18.  
  19.  
  20. /*
  21. <AddBeerAsync
  22. data={'stuff'}
  23. />
  24. */
Add Comment
Please, Sign In to add comment