1
- import React from ' react' ;
1
+ import React from " react" ;
2
2
3
- import { createStore , compose , applyMiddleware } from ' redux' ;
4
- import { createDevTools } from ' redux-devtools' ;
5
- import { createLogger } from ' redux-logger' ;
3
+ import { createStore , compose , applyMiddleware } from " redux" ;
4
+ import { createDevTools } from " redux-devtools" ;
5
+ import { createLogger } from " redux-logger" ;
6
6
7
- import LogMonitor from ' redux-devtools-log-monitor' ;
8
- import DockMonitor from ' redux-devtools-dock-monitor' ;
7
+ import LogMonitor from " redux-devtools-log-monitor" ;
8
+ import DockMonitor from " redux-devtools-dock-monitor" ;
9
9
10
- import { persistStore } from 'redux-persist' ;
11
- import storage from 'redux-persist/es/storage' ;
10
+ import { persistStore } from "redux-persist" ;
12
11
13
12
const logger = createLogger ( ) ;
14
13
15
14
const DevToolsContainer = createDevTools (
16
- < DockMonitor
17
- toggleVisibilityKey = 'ctrl-h'
18
- changePositionKey = 'ctrl-q'
19
- >
15
+ < DockMonitor toggleVisibilityKey = "ctrl-h" changePositionKey = "ctrl-q" >
20
16
< LogMonitor />
21
17
</ DockMonitor >
22
18
) ;
23
19
24
20
let composition = [ ] ;
25
21
26
- if ( process . env . NODE_ENV === ' production' ) {
22
+ if ( process . env . NODE_ENV === " production" ) {
27
23
// Any production-specific reducers
28
24
} else {
29
25
composition . push ( applyMiddleware ( logger ) ) ;
30
- composition . push (
31
- window . __REDUX_DEVTOOLS_EXTENSION__
32
- && window . __REDUX_DEVTOOLS_EXTENSION__ ( )
33
- ) ;
26
+ if ( window . __REDUX_DEVTOOLS_EXTENSION__ ) {
27
+ composition . push ( window . __REDUX_DEVTOOLS_EXTENSION__ ( ) ) ;
28
+ }
34
29
}
35
30
36
31
function initializeStore ( rootReducer ) {
@@ -39,4 +34,4 @@ function initializeStore(rootReducer) {
39
34
return { store, persistor } ;
40
35
}
41
36
42
- export { DevToolsContainer , initializeStore } ;
37
+ export { DevToolsContainer , initializeStore } ;
0 commit comments