diff options
Diffstat (limited to 'frontend/src/index.tsx')
-rw-r--r-- | frontend/src/index.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx new file mode 100644 index 00000000..1733ab26 --- /dev/null +++ b/frontend/src/index.tsx @@ -0,0 +1,22 @@ +import '@blueprintjs/core/lib/css/blueprint.css'; +import 'babel-polyfill'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Provider } from 'react-redux'; +import { ConnectedRouter } from 'react-router-redux'; +import { Application } from './components/Application'; +import { INITIAL_STATE } from './reducers'; +import { configureStore } from './store'; + +const { store, history } = configureStore(INITIAL_STATE); + +const rootElement = document.getElementById('root'); +if (rootElement) { + ReactDOM.render(<Provider store={store}> + <ConnectedRouter history={history}> + <Application/> + </ConnectedRouter> + </Provider>, rootElement); +} else { + console.error('Element with ID "root" was not found, cannot bootstrap react app'); +} |