import * as React from "react" ; export interface ExecuteOnMountProps { onDidMount ( ) : any ; } export class ExecuteOnMount extends React . Component < ExecuteOnMountProps > { public async componentDidMount ( ) { const { onDidMount } = this . props ; if ( ! onDidMount ) { return ; } onDidMount ( ) ; } public render ( ) { return < > { this . props . children } < />; } }