import {combineReducers, createStore, compose}                 from 'redux';
import {searchTextReducer, showCompletedReducer, tasksReducer} from 'reducers';

export var configure = () => {
  var reducer = combineReducers({
    searchText:     searchTextReducer,
    showCompleted:  showCompletedReducer,
    tasks:          tasksReducer
  });

  var store = createStore(reducer, compose(
    window.devToolsExtension ? window.devToolsExtension() : f => f
  ));

  return store;
};

import {combineReducers, createStore, compose}                 from 'redux';
import {searchTextReducer, showCompletedReducer, tasksReducer} from 'reducers';

export var configure = (initialState = {}) => {
  var reducer = combineReducers({
    searchText:     searchTextReducer,
    showCompleted:  showCompletedReducer,
    tasks:          tasksReducer
  });

  var store = createStore(reducer, initialState, compose(
    window.devToolsExtension ? window.devToolsExtension() : f => f
  ));

  return store;
};

Add initialState to store configure
Add initialState to store configure

