1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-05 06:04:28 +07:00
verdaccio-ui/src/index.tsx

29 lines
497 B
TypeScript

import './utils/__setPublicPath__';
import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './App';
const rootNode = document.getElementById('root');
const renderApp = (Component): void => {
ReactDOM.render(
<AppContainer>
<Component />
</AppContainer>,
rootNode
);
};
renderApp(App);
// @ts-ignore
if (module.hot) {
// @ts-ignore
module.hot.accept('./app', () => {
renderApp(App);
});
}