import { createStore } from 'redux';
import rootReducer from '../reducers/index';

export default function configureStore(initialState) {
  return createStore(rootReducer, initialState);
}; 
import { createStore, applyMiddleware } from 'redux';
import rootReducer from '../reducers/index';
import reduxImmutableStateInvariant from 'redux-immutable-state-invariant';

export default function configureStore(initialState) {
  return createStore(
    rootReducer, 
    initialState, 
    applyMiddleware(reduxImmutableStateInvariant())
  );
}; 
configure reduxImmutableStateInvariant middleware in configureStore.js