mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
For Redux dev tools, use newer __REDUX_DEVTOOLS_EXTENSION__ API. Fixes #1196
This commit is contained in:
@@ -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.
|
// Build middleware. These are functions that can process the actions before they reach the store.
|
||||||
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
|
const windowIfDefined = typeof window === 'undefined' ? null : window as any;
|
||||||
// If devTools is installed, connect to it
|
// 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(
|
const createStoreWithMiddleware = compose(
|
||||||
applyMiddleware(thunk, routerMiddleware(history)),
|
applyMiddleware(thunk, routerMiddleware(history)),
|
||||||
devToolsExtension ? devToolsExtension() : <S>(next: StoreEnhancerStoreCreator<S>) => next
|
devToolsExtension ? devToolsExtension() : <S>(next: StoreEnhancerStoreCreator<S>) => next
|
||||||
|
|||||||
Reference in New Issue
Block a user