Add redux-devtools-extension

This commit is contained in:
2018-10-20 14:07:12 +05:30
parent 8c1d413c12
commit a19c33e20c
3 changed files with 13 additions and 2 deletions
+5
View File
@@ -7744,6 +7744,11 @@
"symbol-observable": "^1.2.0"
}
},
"redux-devtools-extension": {
"version": "2.13.5",
"resolved": "https://registry.npmjs.org/redux-devtools-extension/-/redux-devtools-extension-2.13.5.tgz",
"integrity": "sha512-QQ9BRy77oURHMdGys9rfQcCQDzXZ1T4oW+eUyE5Cg7DNVau69HJzc4YNDMOmpi0Dzpi1zOQgQ2rUpgJta4Lfqg=="
},
"regenerate": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz",
+2 -1
View File
@@ -40,7 +40,8 @@
"react-dom": "^16.5.2",
"react-redux": "^5.0.7",
"react-table": "^6.8.6",
"redux": "^4.0.0"
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.5"
},
"devDependencies": {
"@types/jest": "^22.0.1",
+6 -1
View File
@@ -1,4 +1,6 @@
import { Reducer, createStore, Store } from 'redux';
import { devToolsEnhancer } from 'redux-devtools-extension';
import { ApplicationState, FilterStatus, RepoFilterState } from './model';
import {
ActionNames,
@@ -74,6 +76,9 @@ export const reducer: Reducer<ApplicationState, ActionsType> = (
export function createAppStore(): Store<ApplicationState, ActionsType> {
return (createStore<ApplicationState, ActionsType, {}, {}>(
reducer,
initialState
initialState,
devToolsEnhancer({
serialize: true,
})
) as any) as Store<ApplicationState, ActionsType>;
}