This commit is contained in:
Dan Abramov 2015-09-24 22:08:20 +03:00
parent 8c68b9519c
commit 0c3a1c6f7a
7 changed files with 5 additions and 7 deletions

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import CounterApp from './CounterApp'; import CounterApp from './CounterApp';
import Dock from 'react-dock'; import Dock from 'react-dock';

View File

@ -2,4 +2,4 @@ if (process.env.NODE_ENV === 'production') {
module.exports = require('./Root.prod'); module.exports = require('./Root.prod');
} else { } else {
module.exports = require('./Root.dev'); module.exports = require('./Root.dev');
} }

View File

@ -1,5 +1,4 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import CounterApp from './CounterApp'; import CounterApp from './CounterApp';

View File

@ -5,4 +5,4 @@ const rootReducer = combineReducers({
counter counter
}); });
export default rootReducer; export default rootReducer;

View File

@ -10,7 +10,7 @@ const finalCreateStore = compose(
)(createStore); )(createStore);
export default function configureStore(initialState) { export default function configureStore(initialState) {
const store = finalCreateStore(rootReducer); const store = finalCreateStore(rootReducer, initialState);
if (module.hot) { if (module.hot) {
module.hot.accept('../reducers', () => module.hot.accept('../reducers', () =>

View File

@ -2,4 +2,4 @@ if (process.env.NODE_ENV === 'development') {
module.exports = require('./configureStore.prod'); module.exports = require('./configureStore.prod');
} else { } else {
module.exports = require('./configureStore.dev'); module.exports = require('./configureStore.dev');
} }

View File

@ -7,5 +7,5 @@ const finalCreateStore = compose(
)(createStore); )(createStore);
export default function configureStore(initialState) { export default function configureStore(initialState) {
return finalCreateStore(rootReducer); return finalCreateStore(rootReducer, initialState);
} }