import React from 'react' ; import { render , unmountComponentAtNode } from 'react-dom' ; import { Observable } from 'rxjs' ; import { HttpStart as Http , ToastsSetup , CoreTheme } from 'kibana/public' ; import { LicenseStatus } from '../../common' ; import { KibanaThemeProvider } from '../shared_imports' ; import { App } from './app' ; import { AppContextProvider } from './contexts/app_context' ; import { ProfileContextProvider } from './contexts/profiler_context' ; interface AppDependencies { el : HTMLElement ; http : Http ; I18nContext : any ; notifications : ToastsSetup ; initialLicenseStatus : LicenseStatus ; theme$ : Observable < CoreTheme > ; } export const renderApp = ( { el , http , I18nContext , notifications , initialLicenseStatus , theme$ , } ) => { render ( < I18nContext > < KibanaThemeProvider theme$ = { theme$ } > < AppContextProvider args = { { initialLicenseStatus , notifications , http } } > < ProfileContextProvider > < App /> < /ProfileContextProvider> < /AppContextProvider> < /KibanaThemeProvider> < /I18nContext>, el); return ( ) => unmountComponentAtNode ( el ) ; } ;