For Redux dev tools, use newer __REDUX_DEVTOOLS_EXTENSION__ API. Fixes #1196

This commit is contained in:
Steve Sanderson
2017-08-21 16:48:30 -07:00
parent a40adab38d
commit a94ac6f37e

View File

@@ -9,7 +9,7 @@ export default function configureStore(history: History, initialState?: Applicat
// Build middleware. These are functions that can process the actions before they reach the store.
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
// If devTools is installed, connect to it
const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension as () => GenericStoreEnhancer;
const devToolsExtension = windowIfDefined && windowIfDefined.__REDUX_DEVTOOLS_EXTENSION__ as () => GenericStoreEnhancer;
const createStoreWithMiddleware = compose(
applyMiddleware(thunk, routerMiddleware(history)),
devToolsExtension ? devToolsExtension() : <S>(next: StoreEnhancerStoreCreator<S>) => next