Updated remote-redux-devtools configuration in store
This commit is contained in:
parent
589bc90605
commit
d4dbf0f70b
1 changed files with 8 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
Loading…
Reference in a new issue