import React from 'react' ; import ReactDOM from 'react-dom' ; import { AppMountParameters , CoreSetup , CoreStart , Plugin } from '../../../src/core/public' ; import { DeveloperExamplesSetup } from '../../developer_examples/public' ; interface SetupDeps { developerExamples : DeveloperExamplesSetup ; } export class HelloWorldPlugin implements Plugin < void , void , SetupDeps > { public setup ( core , deps ) { core . application . register ( { id : 'helloWorld' , title : 'Hello World' , async mount ( { element } ) { ReactDOM . render ( < div data - test - subj = "helloWorldDiv" > Hello World ! < /div>, element); return ( ) => ReactDOM . unmountComponentAtNode ( element ) ; } , } ) ; deps . developerExamples . register ( { appId : 'helloWorld' , title : 'Hello World Application' , description : `Build a plugin that registers an application that simply says "Hello World"` , } ) ; } public start ( core ) { return { } ; } public stop ( ) { } }