import { Log } from '@microsoft/sp-core-library' ; import { override } from '@microsoft/decorators' ; import * as React from 'react' ; import styles from './HelloWorld.module.scss' ; export interface IHelloWorldProps { text : string ; } const LOG_SOURCE = 'HelloWorld' ; export default class HelloWorld extends React . Component < IHelloWorldProps , { } > { @ override public componentDidMount ( ) { Log . info ( LOG_SOURCE , 'React Element: HelloWorld mounted' ) ; } @ override public componentWillUnmount ( ) { Log . info ( LOG_SOURCE , 'React Element: HelloWorld unmounted' ) ; } @ override public render ( ) { return ( < div className = { styles . HelloWorld } > { this . props . text } < /div>); } }