Commit 9f6ea9fa by baiguangyao
parents 2d772622 7d94bb71
...@@ -15,26 +15,6 @@ import './styles/index.scss'; ...@@ -15,26 +15,6 @@ import './styles/index.scss';
// iconfont // iconfont
import './font/iconfont.css'; import './font/iconfont.css';
var devTools = window.devToolsExtension ? window.devToolsExtension() : null
// var store = createStore(reducer,compose(
// applyMiddleware(thunk,logger),
// devTools
// ))
if (window.devToolsExtension) {
var store = createStore(reducer, compose(
applyMiddleware(thunk, logger),
devTools
))
} else {
var store = createStore(reducer, compose(
applyMiddleware(thunk, logger)
))
}
// ReactDOM.render(
// <Router />,
// document.getElementById('root'));
ReactDOM.render( ReactDOM.render(
<Provider store={store}> <Provider store={store}>
<App /> <App />
......
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { logger } from 'redux-logger'
// import Router from './router';
import store from './store'
import App from './App';
import './index.css'
// 默认样式
import './styles/index.scss';
// iconfont
import './font/iconfont.css';
ReactDOM.render(
<Provider store={tooltore}>
<App />
</Provider>,
document.getElementById('root'));
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { logger } from 'redux-logger'
// import Router from './router';
import store from './store'
import App from './App';
import './index.css'
// 默认样式
import './styles/index.scss';
// iconfont
import './font/iconfont.css';
var tooltore = createStore(reducer,compose(
applyMiddleware(thunk,logger),
devTools
))
// ReactDOM.render(
// <Router />,
// document.getElementById('root'));
ReactDOM.render(
<Provider store={tooltore}>
<App />
</Provider>,
document.getElementById('root'));
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { logger } from 'redux-logger'
// import Router from './router';
import store from './store'
import App from './App';
import './index.css'
// 默认样式
import './styles/index.scss';
// iconfont
import './font/iconfont.css';
var tooltore = createStore(store, compose(
applyMiddleware(thunk,logger)
))
if (window.devToolsExtension) {
tooltore = createStore(store, compose(
applyMiddleware(thunk, logger),
devTools
))
} else {
tooltore = createStore(store, compose(
applyMiddleware(thunk, logger)
))
}
// ReactDOM.render(
// <Router />,
// document.getElementById('root'));
ReactDOM.render(
<Provider store={tooltore}>
<App />
</Provider>,
document.getElementById('root'));
\ No newline at end of file
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { logger } from 'redux-logger'
// import Router from './router';
import store from './store'
import App from './App';
import './index.css'
// 默认样式
import './styles/index.scss';
// iconfont
import './font/iconfont.css';
var tooltore = createStore(store, compose(
applyMiddleware(thunk,logger)
))
// ReactDOM.render(
// <Router />,
// document.getElementById('root'));
ReactDOM.render(
<Provider store={tooltore}>
<App />
</Provider>,
document.getElementById('root'));
\ No newline at end of file
...@@ -15,22 +15,10 @@ import './styles/index.scss'; ...@@ -15,22 +15,10 @@ import './styles/index.scss';
// iconfont // iconfont
import './font/iconfont.css'; import './font/iconfont.css';
var devTools = window.devToolsExtension ? window.devToolsExtension() : null;
var tooltore = ''; var tooltore = createStore(store, compose(
// var store = createStore(reducer,compose( applyMiddleware(thunk,logger)
// applyMiddleware(thunk,logger), ))
// devTools
// ))
if (window.devToolsExtension) {
tooltore = createStore(store, compose(
applyMiddleware(thunk, logger),
devTools
))
} else {
tooltore = createStore(store, compose(
applyMiddleware(thunk, logger)
))
}
// ReactDOM.render( // ReactDOM.render(
// <Router />, // <Router />,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment