Created
September 9, 2018 15:17
-
-
Save sathinduga/ee48e6a25118250560a61e8a669dda9c to your computer and use it in GitHub Desktop.
Debug Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore, combineReducers, compose } from 'redux'; | |
import counterReducer from './reducers/counter_reducer'; | |
const rootReducer = combineReducers({ | |
counter: counterReducer, | |
}); | |
let composeEnhancers = compose; | |
if(__DEV__){ | |
composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | |
} | |
const configStore = () => { | |
return createStore(rootReducer, composeEnhancers()); | |
}; | |
export default configStore; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment