daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import * as React from 'react';
  2. import styles from './HelloWorld.module.scss';
  3. import { IHelloWorldProps } from './IHelloWorldProps';
  4.  
  5. export default class HelloWorld extends React.Component<IHelloWorldProps, {}> {
  6.   private OtherComponent = React.lazy(() => import('./TestComponent' /* webpackChunkName: "testcomponent" */));
  7.  
  8.   public render(): React.ReactElement<IHelloWorldProps> {
  9.     return (
  10.       <div className={ styles.helloWorld }>
  11.         Hello World!
  12.         <React.Suspense fallback={<div>Loading...</div>}>
  13.           <this.OtherComponent />
  14.         </React.Suspense>
  15.       </div>
  16.     );
  17.   }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top