mirror of
https://github.com/TheGreyDiamond/Enlight.git
synced 2026-03-31 23:00:24 +02:00
init
This commit is contained in:
20
enlightApp/app/index.tsx
Normal file
20
enlightApp/app/index.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { AppContainer as ReactHotAppContainer } from 'react-hot-loader';
|
||||
import { history, configuredStore } from './store';
|
||||
import './app.global.css';
|
||||
|
||||
const store = configuredStore();
|
||||
|
||||
const AppContainer = process.env.PLAIN_HMR ? Fragment : ReactHotAppContainer;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const Root = require('./containers/Root').default;
|
||||
render(
|
||||
<AppContainer>
|
||||
<Root store={store} history={history} />
|
||||
</AppContainer>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user