You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
615 B
25 lines
615 B
8 years ago
|
import * as React from "react";
|
||
|
import * as ReactDOM from "react-dom";
|
||
7 years ago
|
import { AppContainer } from "react-hot-loader";
|
||
8 years ago
|
|
||
7 years ago
|
import App from "@app/components/App";
|
||
8 years ago
|
|
||
8 years ago
|
const rootElem = document.getElementById("app");
|
||
8 years ago
|
|
||
7 years ago
|
const doRender = (Component: typeof App) => {
|
||
|
ReactDOM.render((
|
||
|
<AppContainer>
|
||
|
<Component device={device} uiStore={uiStore} />
|
||
|
</AppContainer>
|
||
|
), rootElem);
|
||
|
};
|
||
|
|
||
|
doRender(App);
|
||
8 years ago
|
|
||
|
if (module.hot) {
|
||
7 years ago
|
module.hot.accept("@app/components/App", () => {
|
||
|
const NextApp = require<any>("@app/components/App").default as typeof App;
|
||
7 years ago
|
doRender(NextApp);
|
||
8 years ago
|
});
|
||
|
}
|