Updated remote-redux-devtools configuration in store

This commit is contained in:
Harrison Healey 2016-10-11 10:36:34 -04:00
parent 589bc90605
commit d4dbf0f70b

View file

@ -1,8 +1,8 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {applyMiddleware, compose, createStore} from 'redux';
import devTools from 'remote-redux-devtools';
import {applyMiddleware, createStore} from 'redux';
import {composeWithDevTools} from 'remote-redux-devtools';
import rootReducer from 'reducers/index.js';
import thunk from 'redux-thunk';
@ -10,13 +10,12 @@ export default function configureStore(preloadedState) {
const store = createStore(
rootReducer,
preloadedState,
compose(
applyMiddleware(thunk),
devTools({
name: 'Mattermost',
hostname: 'localhost',
port: 5678
})
composeWithDevTools({
name: 'Mattermost',
hostname: 'localhost',
port: 5678
})(
applyMiddleware(thunk)
)
);
@ -28,9 +27,5 @@ export default function configureStore(preloadedState) {
});
}
// If you have other enhancers & middlewares
// update the store after creating / changing to allow devTools to use them
devTools.updateStore(store);
return store;
}