import React from 'react' ; import ReactDOM from 'react-dom' ; import { AppMountParameters , CoreStart } from '../../../../src/core/public' ; import { AppPluginDependencies } from './types' ; import { StateDemoApp } from './components/app' ; import { createOsdUrlStateStorage } from '../../../../src/plugins/opensearch_dashboards_utils/public/' ; export const renderApp = ( { notifications , http } , { navigation , data } , { element , history } ) => { const osdUrlStateStorage = createOsdUrlStateStorage ( { useHash : false , history } ) ; ReactDOM . render ( < StateDemoApp notifications = { notifications } http = { http } navigation = { navigation } data = { data } history = { history } osdUrlStateStorage = { osdUrlStateStorage } / > , element ) ; return ( ) => ReactDOM . unmountComponentAtNode ( element ) ; } ;