|
@@ -1,10 +1,11 @@
|
|
|
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import ReactDOM from 'react-dom';
|
|
-import { Provider, connect } from 'react-redux';
|
|
|
|
|
|
+import { Provider } from 'react-redux';
|
|
import { createStore, applyMiddleware } from 'redux';
|
|
import { createStore, applyMiddleware } from 'redux';
|
|
-import thunkMiddleware from 'redux-thunk';
|
|
|
|
|
|
+//import thunkMiddleware from 'redux-thunk';
|
|
|
|
|
|
|
|
+import reducers from './reducers/index.js';
|
|
import App from './components/App.js';
|
|
import App from './components/App.js';
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -12,9 +13,12 @@ ex:
|
|
createStore(reducer, applyMiddleware(thunkMiddleware))
|
|
createStore(reducer, applyMiddleware(thunkMiddleware))
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+const store = createStore(reducers, /*initialState,*/ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());
|
|
|
|
|
|
ReactDOM.render(
|
|
ReactDOM.render(
|
|
- <App />,
|
|
|
|
|
|
+ <Provider store={store}>
|
|
|
|
+ <App />
|
|
|
|
+ </Provider>,
|
|
document.getElementById('container')
|
|
document.getElementById('container')
|
|
);
|
|
);
|
|
|
|
|