import React from 'react' ; import { render , unmountComponentAtNode } from 'react-dom' ; import { Router } from 'react-router-dom' ; import { AppDependencies } from './app_context' ; import { AppProviders } from './app_providers' ; import { App } from './app.container' ; const AppWithRouter = ( props ) => ( < Router history = { props . history } > < App { ... props } / > < /Router>); export const renderApp = ( element , dependencies ) => { render ( < AppProviders appDependencies = { dependencies } > < AppWithRouter telemetry = { dependencies . plugins . telemetry } history = { dependencies . services . history } / > < /AppProviders>, element); return ( ) => { unmountComponentAtNode ( element ) ; } ; } ; export type { AppDependencies } ;