import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'mobx-react'; import { createHashHistory } from 'history'; import { Router, Route, useRouterHistory } from 'react-router'; import { RouterStore, syncHistoryWithStore } from 'mobx-react-router'; import weaCustomSetting from 'weaCustomSetting'; const browserHistory = useRouterHistory(createHashHistory)({ queryKey: '_key', basename: '/', }); const routing = new RouterStore(); const allStore = { routing, ...weaCustomSetting.store, }; const history = syncHistoryWithStore(browserHistory, allStore.routing); window.weaHistory = history; const Root = () => ( props.children}> {weaCustomSetting.Route} ); ReactDOM.render(, document.getElementById('container'));