forked from vikingeducation/project_fideligard_spa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
35 lines (28 loc) · 903 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './components/App';
import registerServiceWorker from './registerServiceWorker';
import 'bootstrap/dist/css/bootstrap.css';
import './index.css';
import thunk from 'redux-thunk';
//-----------------------
//react-redux store items
//-----------------------
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
// Import our reducer to use when we create the store
import { stocksApp } from './reducers.js';
import { getStocks } from './actions';
let store = createStore(stocksApp, applyMiddleware(thunk));
// let unsubscribe = store.subscribe(() => {
// console.log(store.getState());
// });
store.dispatch(getStocks());
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
);
registerServiceWorker();