index.tsx 710 B

123456789101112131415161718192021222324252627
  1. import * as React from 'react'
  2. import * as ReactDOM from 'react-dom'
  3. import { AppContainer } from 'react-hot-loader'
  4. import store from './redux/store'
  5. import './index.css'
  6. import Application from './components/Application'
  7. import { Provider } from 'react-redux'
  8. // Create main element
  9. const mainElement = document.createElement('div')
  10. document.body.appendChild(mainElement)
  11. // Render components
  12. ReactDOM.render(
  13. <AppContainer>
  14. <Provider store={store}>
  15. <Application currentView={store.getState().currentView} />
  16. </Provider>
  17. </AppContainer>,
  18. mainElement
  19. )
  20. // setTimeout(() => {
  21. // console.log('firing')
  22. // store.dispatch(setCurrentView(View.LOGIN))
  23. // }, 2500)