import React from 'react' ; import { render , unmountComponentAtNode } from 'react-dom' ; import { Plugin , CoreSetup } from 'opensearch-dashboards/public' ; export class RenderingPlugin implements Plugin { public setup ( core ) { core . application . register ( { id : 'rendering' , title : 'Rendering' , appRoute : '/render/core' , async mount ( context , { element } ) { render ( < h1 data - test - subj = "renderingHeader" > rendering service < /h1>, element); return ( ) => unmountComponentAtNode ( element ) ; } , } ) ; core . application . register ( { id : 'custom-app-route' , title : 'Custom App Route' , appRoute : '/custom/appRoute' , async mount ( context , { element } ) { render ( < h1 data - test - subj = "customAppRouteHeader" > Custom App Route < /h1>, element); return ( ) => unmountComponentAtNode ( element ) ; } , } ) ; } public start ( ) { } public stop ( ) { } }